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 d788c6923f
commit f6f16aa09d

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;
}