tiffset: check memory allocation
fixes #157 / http://bugzilla.maptools.org/show_bug.cgi?id=2850
This commit is contained in:
parent
443bd37f65
commit
b738aaa834
@ -343,6 +343,12 @@ main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
text = (char *) malloc(1000000);
|
||||
if(text == NULL) {
|
||||
fprintf( stderr,
|
||||
"Memory allocation error\n");
|
||||
fclose( fp );
|
||||
continue;
|
||||
}
|
||||
len = fread( text, 1, 999999, fp );
|
||||
text[len] = '\0';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user