Fixed defects

List of Defects

Error: CLANG_WARNING: [#def1]
pcsc-lite-2.0.3-build/pcsc-lite-2.0.3/src/hotplug_libudev.c:256:4: warning[unix.Malloc]: Potential leak of memory pointed to by 'CFBundleName'
#  254|   				}
#  255|   			}
#  256|-> 			bundleRelease(&plist);
#  257|   		}
#  258|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
pcsc-lite-2.0.3-build/pcsc-lite-2.0.3/src/simclist.c: scope_hint: In function 'list_delete_range'
pcsc-lite-2.0.3-build/pcsc-lite-2.0.3/src/simclist.c:601:15: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
#  599|   
#  600|       tmp = list_findpos(l, posstart);    /* first el to be deleted */
#  601|->     lastvalid = tmp->prev;              /* last valid element */
#  602|   
#  603|       midposafter = (l->numels-1-numdel)/2;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
pcsc-lite-2.0.3-build/pcsc-lite-2.0.3/src/simclist.c: scope_hint: In function ‘list_delete_range’
pcsc-lite-2.0.3-build/pcsc-lite-2.0.3/src/simclist.c:601:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  599|   
#  600|       tmp = list_findpos(l, posstart);    /* first el to be deleted */
#  601|->     lastvalid = tmp->prev;              /* last valid element */
#  602|   
#  603|       midposafter = (l->numels-1-numdel)/2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
pcsc-lite-2.0.3-build/pcsc-lite-2.0.3/src/winscard_clnt.c: scope_hint: In function 'SCardAddHandle'
pcsc-lite-2.0.3-build/pcsc-lite-2.0.3/src/winscard_clnt.c:3452:12: warning[-Wanalyzer-malloc-leak]: leak of 'newChannelMap'
# 3450|   
# 3451|   	lrv = list_append(&currentContextMap->channelMapList, newChannelMap);
# 3452|-> 	if (lrv < 0)
# 3453|   	{
# 3454|   		free(newChannelMap->readerName);

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-142.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namepcsc-lite-2.2.3-1.fc41
diffbase-store-results-to/tmp/tmpb4pvefem/pcsc-lite-2.2.3-1.fc41.tar.xz
diffbase-time-created2024-07-03 16:34:33
diffbase-time-finished2024-07-03 16:35:43
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpb4pvefem/pcsc-lite-2.2.3-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpb4pvefem/pcsc-lite-2.2.3-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-142.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namepcsc-lite-2.0.3-1.fc40
store-results-to/tmp/tmp6oqaj_n4/pcsc-lite-2.0.3-1.fc40.tar.xz
time-created2024-07-03 16:32:29
time-finished2024-07-03 16:34:09
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp6oqaj_n4/pcsc-lite-2.0.3-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp6oqaj_n4/pcsc-lite-2.0.3-1.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9