mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Add null check to params in nsStringBundle::GetStringFromName() and nsStringBundle::FormatStringFromName(). Bug 268832, r=jshin, sr=neil.
This commit is contained in:
parent
c37ce6b8bb
commit
3837ec61c8
@ -221,6 +221,10 @@ nsStringBundle::FormatStringFromName(const PRUnichar *aName,
|
||||
PRUint32 aLength,
|
||||
PRUnichar **aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aName);
|
||||
NS_ENSURE_ARG_POINTER(aParams);
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
|
||||
nsresult rv;
|
||||
rv = LoadProperties();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
@ -257,6 +261,9 @@ nsStringBundle::GetStringFromID(PRInt32 aID, PRUnichar **aResult)
|
||||
NS_IMETHODIMP
|
||||
nsStringBundle::GetStringFromName(const PRUnichar *aName, PRUnichar **aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aName);
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
|
||||
nsresult rv;
|
||||
rv = LoadProperties();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
Loading…
Reference in New Issue
Block a user