Opened 6 years ago

Closed 6 years ago

#9877 closed bug (fixed)

[app_server] HTML5DrawingEngine.cpp: Called C++ object pointer is null

Reported by: mt Owned by: axeld
Priority: normal Milestone: R1
Component: Servers/app_server Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

In HTML5DrawingEngine::_ExtractBitmapRegions(), if bitmaps[i] fails to allocate, calling bitmaps[i]->ImportBits() is invalid. Please see attached report.

Attachments (3)

0007-Fix-Called-C-object-pointer-is-null.patch (1.4 KB ) - added by mt 6 years ago.
Patch
report-9QlBqW.html (124.8 KB ) - added by mt 6 years ago.
Report by Clang Static Analyzer
0011-Fix-Called-C-object-pointer-is-null.patch (1.5 KB ) - added by mt 6 years ago.
New patch

Download all attachments as: .zip

Change History (7)

comment:1 by mt, 6 years ago

Has a Patch: set

by mt, 6 years ago

Attachment: report-9QlBqW.html added

Report by Clang Static Analyzer

comment:2 by korli, 6 years ago

if (result != B_OK)
    delete bitmaps[i];

should be moved in the "bitmaps[i] != null" code path. Could you please adjust the patch?

comment:3 by mt, 6 years ago

Thanks for reviewing, I rewrite patch.

comment:4 by korli, 6 years ago

Resolution: fixed
Status: newclosed

Applied in hrev45867. Thanks!

Note: See TracTickets for help on using tickets.