Hi all,

I'm working on a C++ static analyzer (Vigilant Sentry), and squid
is one of my test subjects.  I've been analyzing squid nightly, and
last night a new defect was reported in trunk, src/config_cf.cc:

static bool
parseNamedIntList(const char *data, const String &name, Vector<int> &list)
{
    if (data && (strncmp(data, name.rawBuf(), name.size()) == 0)) {
        /* Edited for brevity */
    }
    return *data == '\0';
}

This function (added yesterday) tests 'data' for NULL, but dereferences
it without a test for NULL later.  If 'data' really can be NULL, this
will cause a crash.  Figured someone might want to take a look.

Mike

-- 
Mike Mueller
Phone: (401) 623-8600 x111
Email: [email protected]

http://www.vigilantsw.com/

Reply via email to