openbsd-ports/graphics/netpbm/patches/patch-pbm_pbmtoxbm_c
brad 73a9fe0066 Several math overflow errors were found in NetPBM by Al Viro and Alan
Cox.  While these programs are not installed suid root, they are often
used to prepare data for processing.  These errors may permit remote
attackers to cause a denial of service or execute arbitrary code in
any programs or scripts that use these graphics conversion tools.

http://marc.theaimsgroup.com/?l=bugtraq&m=104644687816522&w=2
2003-03-29 04:13:54 +00:00

13 lines
451 B
Plaintext

$OpenBSD: patch-pbm_pbmtoxbm_c,v 1.1 2003/03/29 04:13:54 brad Exp $
--- pbm/pbmtoxbm.c.orig Sat Mar 18 21:45:05 2000
+++ pbm/pbmtoxbm.c Fri Mar 28 20:22:06 2003
@@ -93,6 +93,8 @@ main( argc, argv )
bitrow = pbm_allocrow( cols );
/* Compute padding to round cols up to the nearest multiple of 8. */
+
+ overflow_add(cols, 8);
padright = ( ( cols + 7 ) / 8 ) * 8 - cols;
printf( "#define %s_width %d\n", name, cols );