Last Comment Bug 334718 - Ineffective allocation check in NS_NewSVGCairoPathBuilder (nsSVGCairoPathBuilder.cpp)
: Ineffective allocation check in NS_NewSVGCairoPathBuilder (nsSVGCairoPathBuil...
Status: RESOLVED FIXED
: coverity, fixed1.8.0.7, fixed1.8.1
Product: Core
Classification: Components
Component: SVG (show other bugs)
: 1.8 Branch
: All All
: -- minor (vote)
: ---
Assigned To: Ryan Flint [:rflint] (ping via IRC for reviews)
: Hixie (not reading bugmail)
Mentors:
http://lxr.mozilla.org/seamonkey/sour...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-19 14:00 PDT by Kenneth Herron
Modified: 2006-08-23 08:21 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix null check on *result (801 bytes, patch)
2006-04-20 16:55 PDT, Ryan Flint [:rflint] (ping via IRC for reviews)
jwatt: review+
tor: superreview+
dveditz: approval1.8.0.7+
darin.moz: approval1.8.1+
Details | Diff | Review

Description Kenneth Herron 2006-04-19 14:00:21 PDT
This was found through a coverity scan of the mozilla source. |NS_NewSVGCairoPathBuilder| in nsSVGCairoPathBuilder.cpp contains the following code:

 86 nsresult
 87 NS_NewSVGCairoPathBuilder(nsISVGRendererPathBuilder **result,
 88                           cairo_t *ctx)
 89 {
 90   *result = new nsSVGCairoPathBuilder(ctx);
 91   if (!result)
 92     return NS_ERROR_OUT_OF_MEMORY;
 93 
 94   NS_ADDREF(*result);

Shirley line 91 should be testing |*result|, not |result|.
Comment 1 Ryan Flint [:rflint] (ping via IRC for reviews) 2006-04-20 16:55:47 PDT
Created attachment 219219 [details] [diff] [review]
Fix null check on *result
Comment 2 Jonathan Watt [:jwatt] 2006-05-03 09:02:55 PDT
Comment on attachment 219219 [details] [diff] [review]
Fix null check on *result

r=jwatt
Comment 3 tor 2006-05-03 12:16:52 PDT
Comment on attachment 219219 [details] [diff] [review]
Fix null check on *result

File no longer exists on trunk, but could be taken for the 1.8.* branches.
Comment 4 Darin Fisher 2006-06-30 16:38:47 PDT
Comment on attachment 219219 [details] [diff] [review]
Fix null check on *result

a=darin on behalf of drivers
Comment 5 :Gavin Sharp [email: gavin@gavinsharp.com] 2006-07-01 13:04:31 PDT
mozilla/layout/svg/renderer/src/cairo/Attic/nsSVGCairoPathBuilder.cpp 1.6.6.1
Comment 6 Daniel Veditz [:dveditz] 2006-08-15 15:04:58 PDT
Comment on attachment 219219 [details] [diff] [review]
Fix null check on *result

approved for 1.8.0 branch, a=dveditz for drivers
Comment 7 Daniel Veditz [:dveditz] 2006-08-23 08:21:20 PDT
Fix checked into 1.8.0 branch

Note You need to log in before you can comment on or make changes to this bug.