[Libreoffice-commits] core.git: vcl/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 24 18:16:16 UTC 2020


 vcl/source/gdi/metaact.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 589abe39262a37fb1205fac229d7004ee01dd3f9
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Feb 24 10:41:07 2020 +0100
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Feb 24 19:15:35 2020 +0100

    vcl: GCC 9.2.1 -Werror=format-overflow
    
    vcl/source/gdi/metaact.cxx:104:26: error: ‘%u’ directive writing between 1 and 10 bytes into a region of size 6 [-Werror=format-overflow=]
      104 |         sprintf(buffer, "%u", static_cast<unsigned int>(nMetaAction));
    
    Change-Id: Iec295a5a2477b2a13d771c392e0de6c3920a2eac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89350
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 24055dfbc135..bf4902fb9222 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -100,7 +100,7 @@ meta_action_name(MetaActionType nMetaAction)
     default:
         // Yes, return a pointer to a static buffer. This is a very
         // local debugging output function, so no big deal.
-        static char buffer[6];
+        static char buffer[11];
         sprintf(buffer, "%u", static_cast<unsigned int>(nMetaAction));
         return buffer;
     }


More information about the Libreoffice-commits mailing list