[Bug 37125] New: PVS-Studio Error: First the execution, then the trial
https://bugs.winehq.org/show_bug.cgi?id=37125 Bug ID: 37125 Summary: PVS-Studio Error: First the execution, then the trial Product: Wine Version: 1.7.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: lukebenes(a)hotmail.com PVS-Studio identifies a First the execution, then the trial Error,V595. The 'decl' pointer was utilized before it was verified against nullptr. Check lines: 1411, 1417. parser.y 1411 ... var_t *v = decl->var; //<== expr_list_t *sizes = get_attrp(attrs, ATTR_SIZEIS); expr_list_t *lengs = get_attrp(attrs, ATTR_LENGTHIS); int sizeless; expr_t *dim; type_t **ptype; array_dims_t *arr = decl ? decl->array : NULL; //<== type_t *func_type = decl ? decl->func_type : NULL; //<== ... First the value by pointer is taken, then it is checked. Other similar fragments: V595 The 'pcbData' pointer was utilized before it was verified against nullptr. Check lines: 1859, 1862. registry.c 1859 V595 The 'token_user' pointer was utilized before it was verified against nullptr. Check lines: 206, 213. lsa.c 206 V595 The 'psp' pointer was utilized before it was verified against nullptr. Check lines: 2680, 2689. propsheet.c 2680 V595 The 'lpFindInfo' pointer was utilized before it was verified against nullptr. Check lines: 6285, 6289. listview.c 6285 V595 The 'compiland' pointer was utilized before it was verified against nullptr. Check lines: 287, 294. symbol.c 287 V595 The 'graphics' pointer was utilized before it was verified against nullptr. Check lines: 2096, 2112. graphics.c 2096 V595 The 'current' pointer was utilized before it was verified against nullptr. Check lines: 240, 251. request.c 240 details on the V595 error here: http://www.viva64.com/en/d/0205/ -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37125 Luke <lukebenes(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.viva64.com/en/b/ | |0272/ -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37125 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv(a)dawncrow.de -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=37125 --- Comment #1 from Janne <janne.kekkonen@gmail.com> --- Hello, I decided to look into some of the old V595 warnings ("pointer utilized before being verified against nullptr") reported by PVS-Studio in Wine 1.7.22. Below is a comparison of those original reports against the Wine 11.13 branch ====================================================================== 1. ALREADY SAFE / RESOLVED IN Wine 11.13 ====================================================================== * pcbData (in RegGetValueA) - 1.7.22: https://gitlab.winehq.org/wine/wine/-/blob/wine-1.7.22/dlls/advapi32/registr... - Note: Could this have been a false positive or a tool limitation in the original report. The safety check `if (pvData && !pcbData)` already existed right at the start of the function. https://gitlab.winehq.org/wine/wine/-/blob/wine-1.7.22/dlls/advapi32/registr... * psp (in PROPSHEET_CleanUp) - 1.7.22: https://gitlab.winehq.org/wine/wine/-/blob/wine-1.7.22/dlls/comctl32/propshe... - 11.13: https://gitlab.winehq.org/wine/wine/-/blob/wine-11.13/dlls/comctl32/propshee... - Note: The code has been refactored and might not be an issue anymore. * compiland (in symt_new_function) - 1.7.22: https://gitlab.winehq.org/wine/wine/-/blob/wine-1.7.22/dlls/dbghelp/symbol.c... - 11.13: https://gitlab.winehq.org/wine/wine/-/blob/wine-11.13/dlls/dbghelp/symbol.c#... - Note: The code has been refactored and might not be an issue anymore. ====================================================================== 2. UNRESOLVED (These files might still have issues in Wine 11.13) ====================================================================== * decl (in declare_var) - 1.7.22: https://gitlab.winehq.org/wine/wine/-/blob/wine-1.7.22/tools/widl/parser.y#L... - 11.13: https://gitlab.winehq.org/wine/wine/-/blob/wine-11.13/tools/widl/parser.y?re... * lpFindInfo (in LISTVIEW_FindItemW) - 1.7.22: https://gitlab.winehq.org/wine/wine/-/blob/wine-1.7.22/dlls/comctl32/listvie... - 11.13: https://gitlab.winehq.org/wine/wine/-/blob/wine-11.13/dlls/comctl32/listview... * graphics (in get_font_hfont) - 1.7.22: https://gitlab.winehq.org/wine/wine/-/blob/wine-1.7.22/dlls/gdiplus/graphics... - 11.13: https://gitlab.winehq.org/wine/wine/-/blob/wine-11.13/dlls/gdiplus/graphics.... * current (in call_req_handler) - 1.7.22: https://gitlab.winehq.org/wine/wine/-/blob/wine-1.7.22/server/request.c#L240 - 11.13: https://gitlab.winehq.org/wine/wine/-/blob/wine-11.13/server/request.c#L297 * token_user (in test_lsa) - 1.7.22: https://gitlab.winehq.org/wine/wine/-/blob/wine-1.7.22/dlls/advapi32/tests/l... - 11.13: https://gitlab.winehq.org/wine/wine/-/blob/wine-11.13/dlls/advapi32/tests/ls... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla