Bug #730056 fixed - empty license file error added
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2514 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b3308d1d7f
commit
d506d0879a
1 changed files with 6 additions and 0 deletions
|
@ -1054,6 +1054,12 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
}
|
||||
fseek(fp,0,SEEK_END);
|
||||
datalen=ftell(fp);
|
||||
if (!datalen)
|
||||
{
|
||||
ERROR_MSG("LicenseData: empty license file \"%s\"\n",line.gettoken_str(a));
|
||||
fclose(fp);
|
||||
return PS_ERROR;
|
||||
}
|
||||
rewind(fp);
|
||||
char *data=(char*)malloc(datalen+1);
|
||||
if (fread(data,1,datalen,fp) != datalen) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue