зеркало из https://github.com/mozilla/pjs.git
Bug 615842 - comparison between signed and unsigned integer expressions in ReadStrings. r=rstrong a=mossop
This commit is contained in:
Родитель
feb5230def
Коммит
d17d9715a2
|
@ -167,10 +167,11 @@ ReadStrings(const NS_tchar *path,
|
|||
if (fseek(fp, 0, SEEK_END) != 0)
|
||||
return READ_ERROR;
|
||||
|
||||
long flen = ftell(fp);
|
||||
if (flen == 0)
|
||||
long len = ftell(fp);
|
||||
if (len <= 0)
|
||||
return READ_ERROR;
|
||||
|
||||
size_t flen = size_t(len);
|
||||
char *fileContents = new char[flen + 1];
|
||||
if (!fileContents)
|
||||
return MEM_ERROR;
|
||||
|
|
Загрузка…
Ссылка в новой задаче