File netpbm-CVE-2018-8975.patch of Package netpbm.11270

Index: netpbm-10.82.2/editor/pbmmask.c
===================================================================
--- netpbm-10.82.2.orig/editor/pbmmask.c	2018-06-27 13:03:00.431710863 +0200
+++ netpbm-10.82.2/editor/pbmmask.c	2018-06-27 15:45:40.194531538 +0200
@@ -144,6 +144,12 @@ main(int argc, char * argv[]) {
 
     bits = pbm_readpbm( ifp, &cols, &rows );
     pm_close( ifp );
+    if (cols <= 0 || rows <= 0)
+    {
+      pm_error("invalid width or height");
+      free(bits);
+      return 0;
+    }
     mask = pbm_allocarray( cols, rows );
 
     /* Clear out the mask. */