[Libreoffice-commits] core.git: include/sfx2

Stephan Bergmann sbergman at redhat.com
Wed Jun 3 01:17:19 PDT 2015


 include/sfx2/msg.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d60719015e1a82873b39565b77c24e6ae28edd24
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jun 3 10:14:20 2015 +0200

    Use variable-length array idiom for SfxType::aAttrib
    
    ...to avoid false -fsanitize=array-bounds warnings.  All instances of SfxType
    are created (in idl) as instances of SfxTypeN with properly sized nAttrib
    arrays.
    
    Change-Id: Iad9faa467affed656750df6bb8579d85829e97ca

diff --git a/include/sfx2/msg.hxx b/include/sfx2/msg.hxx
index 89faffd..611156a 100644
--- a/include/sfx2/msg.hxx
+++ b/include/sfx2/msg.hxx
@@ -112,7 +112,7 @@ struct SfxType
 {
     TypeId          aTypeId;
     sal_uInt16          nAttribs;
-    SfxTypeAttrib   aAttrib[16];
+    SfxTypeAttrib   aAttrib[1]; // variable length
 
     const TypeId&   Type() const
                     { return aTypeId; }


More information about the Libreoffice-commits mailing list