~smspillaz/compiz-core/decor.input_extents_update

« back to all changes in this revision

Viewing changes to src/string/src/string.cpp

  • Committer: Alan Griffiths
  • Author(s): Daniel van Vugt
  • Date: 2012-03-23 14:13:25 UTC
  • mfrom: (3066.1.1 fix-957572)
  • Revision ID: alan@octopull.co.uk-20120323141325-zkcotkacy8xlm9wa
[Coverity] Avoid potential NULL pointer dereference (LP: #957572)

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
CompString compPrintf (const char *format, va_list ap)
45
45
{
46
46
    va_list      aq;
47
 
    unsigned int size = strlen (format) + 1;
48
47
    int          n;
49
48
    char         *str;
50
49
 
51
50
    if (!format)
52
51
        return CompString ("");
53
52
 
 
53
    unsigned int size = strlen (format) + 1;
54
54
    str = new char[size];
55
55
 
56
56
    if (!str)