Merge branch 'issue-157' into 'master'

tiffset: check memory allocation

Closes #157

See merge request libtiff/libtiff!132
This commit is contained in:
Even Rouault 2020-03-23 18:06:41 +00:00
commit 9b64089083

View File

@ -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';