diff options
Diffstat (limited to 'source/l/netpbm/netpbm-CVE-2017-2587.patch')
-rw-r--r-- | source/l/netpbm/netpbm-CVE-2017-2587.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/l/netpbm/netpbm-CVE-2017-2587.patch b/source/l/netpbm/netpbm-CVE-2017-2587.patch new file mode 100644 index 00000000..7e3bad7b --- /dev/null +++ b/source/l/netpbm/netpbm-CVE-2017-2587.patch @@ -0,0 +1,26 @@ +diff -urNp old/converter/other/svgtopam.c new/converter/other/svgtopam.c +--- old/converter/other/svgtopam.c 2017-02-08 12:11:02.593690917 +0100 ++++ new/converter/other/svgtopam.c 2017-02-08 13:49:38.319029371 +0100 +@@ -771,12 +771,17 @@ createCanvas(unsigned int const width, + + MALLOCVAR_NOFAIL(canvasP); + +- canvasP->width = width; +- canvasP->height = height; +- canvasP->pixels = ppm_allocarray(width, height); +- canvasP->maxval = maxval; ++ if(canvasP != NULL){ ++ canvasP->width = width; ++ canvasP->height = height; ++ canvasP->pixels = ppm_allocarray(width, height); ++ canvasP->maxval = maxval; ++ ++ *canvasPP = canvasP; ++ } else { ++ pm_error("can't allocate memory for canvas"); ++ } + +- *canvasPP = canvasP; + } + + |