bug 341008 Fix sscanf error checking

r=mvl sr=darin a=darin
This commit is contained in:
cbiesinger%web.de 2006-06-15 13:52:00 +00:00
parent 0ce991da3a
commit 5b2acd0545

View File

@ -700,7 +700,7 @@ nsPermissionManager::Read()
}
PRUint32 type;
if (!PR_sscanf(buffer.get() + 1, "%u", &type) || type >= NUMBER_OF_TYPES) {
if (PR_sscanf(buffer.get() + 1, "%u", &type) != 1 || type >= NUMBER_OF_TYPES) {
continue;
}