[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dereference of undefined pointer value in conftest.c

From: Tomas Carnecky
Subject: Dereference of undefined pointer value in conftest.c
Date: Sun, 06 Dec 2009 21:10:47 +0100
User-agent: Thunderbird (X11/20091206)

I just ran the clang static analyzer on the xserver configure script and
it reported a few issues. Most of them were dead assignments/increments,
but there also was one dereference of an undefined pointer value. I
don't know which tests the conftest.c belongs to, but I doubt it's to
test if an application can safely write to unknown memory ;). The test
contains the following code:

{ /* SCO 3.2v4 cc rejects this. */
    char *t;
    char const *s = 0 ? (char *) 0 : (char const *) 0;
    *t++ = 0; /* <<< t is undefined! */
    if (s) return 0;

Tell me if you want more informations or if you are interested in the
full report from clang.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]