diff options
Diffstat (limited to 'external')
-rw-r--r-- | external/firebird/ubsan.patch | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/external/firebird/ubsan.patch b/external/firebird/ubsan.patch index bdfbac26e2f8..5fe298539ec3 100644 --- a/external/firebird/ubsan.patch +++ b/external/firebird/ubsan.patch @@ -183,6 +183,15 @@ jumpLength = jumpNode.length + jumpNode.prefix; // Check if this could be our split point (if we need to split) +@@ -5391,7 +5391,7 @@ + // First, store needed data for beforeInsertNode into tempData. + HalfStaticArray<UCHAR, MAX_KEY> tempBuf; + UCHAR* tempData = tempBuf.getBuffer(newLength); +- memcpy(tempData, beforeInsertNode.data + newPrefix - beforeInsertNode.prefix, newLength); ++ if (newLength != 0) memcpy(tempData, beforeInsertNode.data + newPrefix - beforeInsertNode.prefix, newLength); + + beforeInsertNode.prefix = newPrefix; + beforeInsertNode.length = newLength; @@ -5611,7 +5611,7 @@ for (size_t i = 0; i < jumpNodes->getCount(); i++, index++) { |