Check input file size

Fixes #2
This commit is contained in:
Joergen Ibsen 2019-01-13 21:03:37 +01:00
parent 689eb2f1ab
commit ef52ad2d06
1 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,10 @@ int main(int argc, char *argv[])
fseek(fin, 0, SEEK_SET);
if (len < 18) {
exit_error("input too small");
}
source = (unsigned char *) malloc(len);
if (source == NULL) {