mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 13:52:37 +00:00
Bug 615842 - comparison between signed and unsigned integer expressions in ReadStrings. r=rstrong a=mossop
This commit is contained in:
parent
4156f1546d
commit
67623f003b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user