diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /external/nss/ubsan.patch.0 | |
parent | Initial commit. (diff) | |
download | libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.tar.xz libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/nss/ubsan.patch.0')
-rw-r--r-- | external/nss/ubsan.patch.0 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/external/nss/ubsan.patch.0 b/external/nss/ubsan.patch.0 new file mode 100644 index 000000000..059a9f3b2 --- /dev/null +++ b/external/nss/ubsan.patch.0 @@ -0,0 +1,29 @@ +--- nss/lib/softoken/legacydb/pk11db.c ++++ nss/lib/softoken/legacydb/pk11db.c +@@ -65,7 +65,7 @@ + unsigned char isModuleDBOnly; + unsigned char isCritical; + unsigned char reserved[4]; +- unsigned char names[6]; /* enough space for the length fields */ ++ unsigned char names[1]; /* +5: enough space for the length fields */ + }; + + struct lgdbSlotDataStr { +@@ -148,7 +148,7 @@ + goto loser; + } + +- dataLen = sizeof(lgdbData) + len + len2 + len3 + sizeof(unsigned short) + ++ dataLen = sizeof(lgdbData)+5 + len + len2 + len3 + sizeof(unsigned short) + + count * sizeof(lgdbSlotData); + + data->data = (unsigned char *)PORT_ZAlloc(dataLen); +@@ -327,7 +327,7 @@ + } + if ((encoded->major == LGDB_DB_EXT1_VERSION_MAJOR) && + (encoded->minor >= LGDB_DB_EXT1_VERSION_MINOR)) { +- CHECK_SIZE(sizeof(lgdbData)); ++ CHECK_SIZE(sizeof(lgdbData)+5); + trustOrder = LGDB_GETLONG(encoded->trustOrder); + cipherOrder = LGDB_GETLONG(encoded->cipherOrder); + isModuleDB = (encoded->isModuleDB != 0) ? PR_TRUE : PR_FALSE; |