[/home/cahrendt/wine-git/dlls/ntdll/server.c:802]: (error) Resource leak: fd [/home/cahrendt/wine-git/dlls/ntdll/server.c:882]: (error) Resource leak: fd_cwd These two are false positives, as the process ends (calling exit(1) [/home/cahrendt/wine-git/dlls/rpcrt4/tests/server.c:1189]: (possible error) Array index out of bounds This one is a false positive, it uses FIELD_OFFSET(cs_t, ca[5]), and it found an array: int ca[5]; [/home/cahrendt/wine-git/dlls/wineps.drv/init.c:270]: (error) Possible null pointer dereference: dmW - otherwise it is redundant to check if dmW is null at line 272 That is a bug, sent a patch HTH, Joris
2009/9/19 Joris Huizer <joris_huizer(a)yahoo.com>
[/home/cahrendt/wine-git/dlls/wineps.drv/init.c:270]: (error) Possible null pointer dereference: dmW - otherwise it is redundant to check if dmW is null at line 272
That is a bug, sent a patch
HTH,
Joris
Joris, As explained in a previous mail, there's no bug and the code is perfectly valid. Even if you send a patch to please cppcheck, you should report it as being a false positive. Chris, Please try to filter out those lines, they were already there in your previous reports. -- Nicolas Le Cam
On Sat, Sep 19, 2009 at 1:59 PM, Joris Huizer <joris_huizer(a)yahoo.com>wrote:
[/home/cahrendt/wine-git/dlls/rpcrt4/tests/server.c:1189]: (possible error) Array index out of bounds
This one is a false positive, it uses FIELD_OFFSET(cs_t, ca[5]), and it found an array: int ca[5];
int ca[5]; has only entries up to ca[4] (0-4) so to me it looks like bug.
2009/9/20 Pauli Nieminen <suokkos(a)gmail.com>
On Sat, Sep 19, 2009 at 1:59 PM, Joris Huizer <joris_huizer(a)yahoo.com> wrote:
[/home/cahrendt/wine-git/dlls/rpcrt4/tests/server.c:1189]: (possible error) Array index out of bounds
This one is a false positive, it uses FIELD_OFFSET(cs_t, ca[5]), and it found an array: int ca[5];
int ca[5]; has only entries up to ca[4] (0-4) so to me it looks like bug.
Not quite. For one, the ca[5] that's being used here isn't the local variable ca[5], but the field ca[1] of the cs_t structure. The expression is used as a way to calculate the size of a cs_t structure with 5 elements.
participants (4)
-
Henri Verbeet -
Joris Huizer -
Nicolas Le Cam -
Pauli Nieminen