netpbm/netpbm-10.35-pnmmontagefix.patch
Jindrich Novy 02fb227dc3 - unbreak ppmshadow and ppmrainbow (#476989)
- pnmmontage won't crash because of uninitialized memory usage
2008-12-23 20:37:42 +00:00

12 lines
576 B
Diff

diff -up netpbm-10.35.57/editor/pnmmontage.c.pnmmontagefix netpbm-10.35.57/editor/pnmmontage.c
--- netpbm-10.35.57/editor/pnmmontage.c.pnmmontagefix 2008-12-15 10:04:29.000000000 +0100
+++ netpbm-10.35.57/editor/pnmmontage.c 2008-12-23 20:09:01.000000000 +0100
@@ -346,6 +346,7 @@ main(int argc, char **argv)
}
pnm_readpaminit(imgs[0].file, &imgs[0], PAM_STRUCT_SIZE(tuple_type));
+ memset(&outimg, 0, sizeof(outimg));
outimg.maxval = imgs[0].maxval;
outimg.format = imgs[0].format;
memcpy(outimg.tuple_type, imgs[0].tuple_type, sizeof(imgs[0].tuple_type));