summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/graphicsmagick/files/graphicsmagick-1.3.35-oss-fuzz-20045-20318-21956.patch')
-rw-r--r--media-gfx/graphicsmagick/files/graphicsmagick-1.3.35-oss-fuzz-20045-20318-21956.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.35-oss-fuzz-20045-20318-21956.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.35-oss-fuzz-20045-20318-21956.patch
new file mode 100644
index 000000000000..c7921dd2e699
--- /dev/null
+++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.35-oss-fuzz-20045-20318-21956.patch
@@ -0,0 +1,38 @@
+diff -r 50395430a371 -r 83b4d2b4b873 coders/wpg.c
+--- a/coders/wpg.c Sat May 30 10:18:16 2020 -0500
++++ b/coders/wpg.c Sat May 30 17:33:51 2020 -0500
+@@ -403,7 +403,7 @@
+ x++; \
+ if((long) x>=ldblk) \
+ { \
+- if(InsertRow(BImgBuff,y,image,bpp)==MagickFail) RetVal=-6; \
++ if(InsertRow(BImgBuff,y,image,bpp)==MagickFail) { RetVal=-6; goto unpack_wpg_raser_error; } \
+ x=0; \
+ y++; \
+ if(y>=image->rows) break; \
+@@ -537,6 +537,7 @@
+ }
+ }
+ }
++unpack_wpg_raser_error:;
+ MagickFreeMemory(BImgBuff);
+ return(RetVal);
+ }
+@@ -552,7 +553,7 @@
+ x++; \
+ if((long) x >= ldblk) \
+ { \
+- if(InsertRow(BImgBuff,(long) y,image,bpp)==MagickFail) RetVal=-6; \
++ if(InsertRow(BImgBuff,(long) y,image,bpp)==MagickFail) { RetVal=-6; goto unpack_wpg2_error; } \
+ x=0; \
+ y++; \
+ XorMe = 0; \
+@@ -729,6 +730,7 @@
+ }
+ }
+ }
++unpack_wpg2_error:;
+ FreeUnpackWPG2RasterAllocs(BImgBuff,UpImgBuff);
+ return(RetVal);
+ }
+