Closed
Bug 615066
Opened 14 years ago
Closed 14 years ago
potential crash [@ nsPluginHost::HandleBadPlugin] if !aInstance
Categories
(Core Graveyard :: Plug-ins, defect)
Core Graveyard
Plug-ins
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity, crash)
Crash Data
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
timeless
:
review+
jaas
:
approval2.0+
|
Details | Diff | Splinter Review |
3184 nsPluginHost::HandleBadPlugin(PRLibrary* aLibrary, nsIPluginInstance *aInstance)
3185 {
3198 if (aInstance)
3199 aInstance->GetOwner(getter_AddRefs(owner));
3237 nsNPAPIPluginInstance *instance = static_cast<nsNPAPIPluginInstance*>(aInstance);
3238
3239 nsNPAPIPlugin *plugin = instance->GetPlugin();
Comment on attachment 493557 [details] [diff] [review]
patch
>- nsXPIDLString brandName;
>- if (NS_FAILED(rv = bundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
>- getter_Copies(brandName))))
>- return rv;
I'd prefer if for readability you put "rv = ..." on its own line above "if (NS_FAILED(...". This pattern shows up a few times in the patch.
>- // add plugin name to the message
>- nsCString pluginname;
>- if (!pluginTag->mName.IsEmpty())
>- pluginname = pluginTag->mName;
>- else
>- pluginname = pluginTag->mFileName;
While you're at it can you put brackets around these if statements? I don't care much about simple return statements but I prefer bracketed if statements for other things.
Otherwise looks good, thanks.
Attachment #493557 -
Flags: review?(joshmoz) → review+
Attachment #493557 -
Attachment is obsolete: true
Attachment #495391 -
Flags: review+
Attachment #495391 -
Flags: approval2.0?
Attachment #495391 -
Flags: approval2.0? → approval2.0+
Keywords: checkin-needed
Comment 4•14 years ago
|
||
Updated•13 years ago
|
Crash Signature: [@ nsPluginHost::HandleBadPlugin]
Updated•6 years ago
|
Blocks: coverity-analysis
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•