Merge lp:~vanvugt/compiz-core/fix-957572 into lp:compiz-core

Proposed by Daniel van Vugt
Status: Merged
Merged at revision: 3068
Proposed branch: lp:~vanvugt/compiz-core/fix-957572
Merge into: lp:compiz-core
Diff against target: 18 lines (+1/-1)
1 file modified
src/string/src/string.cpp (+1/-1)
To merge this branch: bzr merge lp:~vanvugt/compiz-core/fix-957572
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
Review via email: mp+98962@code.launchpad.net

Description of the change

[Coverity] Avoid potential NULL pointer dereference (LP: #957572)

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Looks like a precondition violation really, but... OK.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/string/src/string.cpp'
2--- src/string/src/string.cpp 2012-01-12 06:48:58 +0000
3+++ src/string/src/string.cpp 2012-03-23 04:04:18 +0000
4@@ -44,13 +44,13 @@
5 CompString compPrintf (const char *format, va_list ap)
6 {
7 va_list aq;
8- unsigned int size = strlen (format) + 1;
9 int n;
10 char *str;
11
12 if (!format)
13 return CompString ("");
14
15+ unsigned int size = strlen (format) + 1;
16 str = new char[size];
17
18 if (!str)

Subscribers

People subscribed via source and target branches