73a9fe0066
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
16 lines
676 B
Plaintext
16 lines
676 B
Plaintext
$OpenBSD: patch-pbm_pbmreduce_c,v 1.1 2003/03/29 04:13:54 brad Exp $
|
|
--- pbm/pbmreduce.c.orig Wed Apr 26 15:24:02 2000
|
|
+++ pbm/pbmreduce.c Fri Mar 28 20:22:06 2003
|
|
@@ -92,8 +92,9 @@ main( argc, argv )
|
|
|
|
if ( halftone == QT_FS ) {
|
|
/* Initialize Floyd-Steinberg. */
|
|
- thiserr = (long*) malloc( ( newcols + 2 ) * sizeof(long) );
|
|
- nexterr = (long*) malloc( ( newcols + 2 ) * sizeof(long) );
|
|
+ overflow_add(newcols, 2);
|
|
+ thiserr = (long*) malloc2( ( newcols + 2 ), sizeof(long) );
|
|
+ nexterr = (long*) malloc2( ( newcols + 2 ), sizeof(long) );
|
|
if ( thiserr == 0 || nexterr == 0 )
|
|
pm_error( "out of memory" );
|
|
|