summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/poppler/ubsan.patch.011
1 files changed, 11 insertions, 0 deletions
diff --git a/external/poppler/ubsan.patch.0 b/external/poppler/ubsan.patch.0
index 2b0b334b23e1..623858da9f1f 100644
--- a/external/poppler/ubsan.patch.0
+++ b/external/poppler/ubsan.patch.0
@@ -1,3 +1,14 @@
+--- goo/GooString.cc
++++ goo/GooString.cc
+@@ -161,7 +161,7 @@
+ // assert(s != s1) the roundedSize condition ensures this
+ if (newLength < length) {
+ memcpy(s1, s, newLength);
+- } else {
++ } else if (length != 0) {
+ memcpy(s1, s, length);
+ }
+ if (s != sStatic)
--- poppler/Stream.cc
+++ poppler/Stream.cc
@@ -2966,12 +2966,12 @@