Bug 1159302 - handle ftell errors in nsINIParser::InitFromFile; r=erahm

This commit is contained in:
Nathan Froyd 2015-04-28 12:09:31 -04:00
parent f843c7f96c
commit 75988e9e44

View File

@ -117,7 +117,8 @@ nsINIParser::InitFromFILE(FILE* aFd)
}
long flen = ftell(aFd);
if (flen == 0) {
/* zero-sized file, or an error */
if (flen <= 0) {
return NS_ERROR_FAILURE;
}