Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
vlc-3.0.23/modules/lua/libs/net.c:316:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc((long unsigned int)i_fds * 8)’
vlc-3.0.23/modules/lua/libs/net.c:297:12: enter_function: entry to ‘vlclua_net_poll’
vlc-3.0.23/modules/lua/libs/net.c:309:28: call_function: calling ‘xmalloc’ from ‘vlclua_net_poll’
vlc-3.0.23/modules/lua/libs/net.c:309:28: return_function: returning to ‘vlclua_net_poll’ from ‘xmalloc’
vlc-3.0.23/modules/lua/libs/net.c:310:19: call_function: calling ‘xmalloc’ from ‘vlclua_net_poll’
vlc-3.0.23/modules/lua/libs/net.c:310:19: return_function: returning to ‘vlclua_net_poll’ from ‘xmalloc’
vlc-3.0.23/modules/lua/libs/net.c:313:21: branch_true: following ‘true’ branch...
vlc-3.0.23/modules/lua/libs/net.c:315:21: branch_true: ...to here
vlc-3.0.23/modules/lua/libs/net.c:316:23: call_function: calling ‘vlclua_fd_get’ from ‘vlclua_net_poll’
vlc-3.0.23/modules/lua/libs/net.c:316:23: return_function: returning to ‘vlclua_net_poll’ from ‘vlclua_fd_get’
vlc-3.0.23/modules/lua/libs/net.c:316:9: danger: ‘xmalloc((long unsigned int)i_fds * 8) + (long unsigned int)i * 8’ could be NULL: unchecked value from [(4)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/3)
#  314|       {
#  315|           luafds[i] = luaL_checkint( L, -2 );
#  316|->         p_fds[i].fd = vlclua_fd_get( L, luafds[i] );
#  317|           p_fds[i].events = luaL_checkinteger( L, -1 );
#  318|           p_fds[i].events &= POLLIN | POLLOUT | POLLPRI;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
vlc-3.0.23/modules/lua/libs/net.c:337:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc((long unsigned int)i_fds * 4) + (long unsigned int)i * 4’
vlc-3.0.23/modules/lua/libs/net.c:297:12: enter_function: entry to ‘vlclua_net_poll’
vlc-3.0.23/modules/lua/libs/net.c:309:28: call_function: calling ‘xmalloc’ from ‘vlclua_net_poll’
vlc-3.0.23/modules/lua/libs/net.c:309:28: return_function: returning to ‘vlclua_net_poll’ from ‘xmalloc’
vlc-3.0.23/modules/lua/libs/net.c:310:19: call_function: calling ‘xmalloc’ from ‘vlclua_net_poll’
vlc-3.0.23/modules/lua/libs/net.c:310:19: return_function: returning to ‘vlclua_net_poll’ from ‘xmalloc’
vlc-3.0.23/modules/lua/libs/net.c:313:21: branch_false: following ‘false’ branch...
vlc-3.0.23/modules/lua/libs/net.c:322:29: branch_false: ...to here
vlc-3.0.23/modules/lua/libs/net.c:327:11: branch_true: following ‘true’ branch...
vlc-3.0.23/modules/lua/libs/net.c:333:5: branch_true: ...to here
vlc-3.0.23/modules/lua/libs/net.c:335:21: branch_true: following ‘true’ branch (when ‘i_fds > i’)...
vlc-3.0.23/modules/lua/libs/net.c:337:35: branch_true: ...to here
vlc-3.0.23/modules/lua/libs/net.c:337:29: danger: ‘xmalloc((long unsigned int)i_fds * 4) + (long unsigned int)i * 4’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
#  335|       for( int i = 0; i < i_fds; i++ )
#  336|       {
#  337|->         lua_pushinteger( L, luafds[i] );
#  338|           lua_pushinteger( L, (val >= 0) ? p_fds[i].revents : 0 );
#  339|           lua_settable( L, 1 );

Scan Properties

analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.95.0
diffbase-analyzer-version-cppcheck2.20.0
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-119.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namevlc-3.0.23-11.fc45
diffbase-store-results-to/tmp/tmpucf0z6ix/vlc-3.0.23-11.fc45.tar.xz
diffbase-time-created2026-06-01 17:33:45
diffbase-time-finished2026-06-01 17:45:41
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpucf0z6ix/vlc-3.0.23-11.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpucf0z6ix/vlc-3.0.23-11.fc45.src.rpm'
diffbase-tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-119.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namevlc-3.0.23-8.fc44
store-results-to/tmp/tmpqedlh7ib/vlc-3.0.23-8.fc44.tar.xz
time-created2026-06-01 17:20:44
time-finished2026-06-01 17:33:14
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpqedlh7ib/vlc-3.0.23-8.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpqedlh7ib/vlc-3.0.23-8.fc44.src.rpm'
tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9