fix oob write in genversion

This commit is contained in:
Tim Felgentreff 2020-11-09 10:36:55 +01:00
parent 476161cf2c
commit 301c6dfc93

View file

@ -74,9 +74,7 @@ int main(int argc, char * argv[]) {
free(gitrevfile); free(gitrevfile);
if (file) { if (file) {
git_rev = (char*)calloc(sizeof(char), 1024); git_rev = (char*)calloc(sizeof(char), 1024);
if (fscanf(file, "%s", git_rev) != 1) { fscanf(file, "%s", git_rev);
new_ver[4] = -1;
}
fclose(file); fclose(file);
} }
} else { } else {