diff --git a/tools/genversion.cpp b/tools/genversion.cpp index c6af106c1..2c097c616 100644 --- a/tools/genversion.cpp +++ b/tools/genversion.cpp @@ -78,6 +78,7 @@ int main(int argc, char * argv[]) { file = fopen(gitrevfile, "r"); free(gitrevfile); if (file) { + git_rev = (char*)calloc(sizeof(char), 1024); if (fscanf(file, "%s", &git_rev) != 1) { new_ver[4] = -1; }