Merge branch 'issue-157' into 'master'
tiffset: check memory allocation Closes #157 See merge request libtiff/libtiff!132
This commit is contained in:
commit
9b64089083
@ -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