Bug 1151506 - Null-check the count parameter in GetConstantCount. r=froydnj

This commit is contained in:
David Major 2015-06-24 09:07:11 -07:00
parent 29eec391b3
commit 2f80184007

View File

@ -190,6 +190,9 @@ xptiInterfaceEntry::GetConstantCount(uint16_t* count)
if(!EnsureResolved())
return NS_ERROR_UNEXPECTED;
if(!count)
return NS_ERROR_UNEXPECTED;
*count = mConstantBaseIndex +
mDescriptor->num_constants;
return NS_OK;