Allow dialogs to create multiple instances in Online
[LibreOffice.git] / external / nss / ubsan.patch.0
blob059a9f3b2c0acf593e66822fcc3c9122ab0d3b6f
1 --- nss/lib/softoken/legacydb/pk11db.c
2 +++ nss/lib/softoken/legacydb/pk11db.c
3 @@ -65,7 +65,7 @@
4      unsigned char isModuleDBOnly;
5      unsigned char isCritical;
6      unsigned char reserved[4];
7 -    unsigned char names[6]; /* enough space for the length fields */
8 +    unsigned char names[1]; /* +5: enough space for the length fields */
9  };
11  struct lgdbSlotDataStr {
12 @@ -148,7 +148,7 @@
13          goto loser;
14      }
16 -    dataLen = sizeof(lgdbData) + len + len2 + len3 + sizeof(unsigned short) +
17 +    dataLen = sizeof(lgdbData)+5 + len + len2 + len3 + sizeof(unsigned short) +
18                count * sizeof(lgdbSlotData);
20      data->data = (unsigned char *)PORT_ZAlloc(dataLen);
21 @@ -327,7 +327,7 @@
22      }
23      if ((encoded->major == LGDB_DB_EXT1_VERSION_MAJOR) &&
24          (encoded->minor >= LGDB_DB_EXT1_VERSION_MINOR)) {
25 -        CHECK_SIZE(sizeof(lgdbData));
26 +        CHECK_SIZE(sizeof(lgdbData)+5);
27          trustOrder = LGDB_GETLONG(encoded->trustOrder);
28          cipherOrder = LGDB_GETLONG(encoded->cipherOrder);
29          isModuleDB = (encoded->isModuleDB != 0) ? PR_TRUE : PR_FALSE;