python-pycdio-2.1.1-7.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
pycdio-2.1.1/swig/pycdio_wrap.c:724:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘iter’
pycdio-2.1.1/swig/pycdio_wrap.c:6693:22: enter_function: entry to ‘_wrap_is_tocfile’
pycdio-2.1.1/swig/pycdio_wrap.c:6703:6: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
pycdio-2.1.1/swig/pycdio_wrap.c:6705:10: branch_false: ...to here
pycdio-2.1.1/swig/pycdio_wrap.c:6705:10: call_function: calling ‘SWIG_AsCharPtrAndSize’ from ‘_wrap_is_tocfile’
#  722|     swig_module_info *iter = start;
#  723|     do {
#  724|->     if (iter->size) {
#  725|         size_t l = 0;
#  726|         size_t r = iter->size - 1;

Error: CPPCHECK_WARNING (CWE-457): [#def2]
pycdio-2.1.1/swig/pycdio_wrap.c:872: warning[uninitvar]: Uninitialized variable: buff
#  870|       *r = 0;
#  871|     }
#  872|->   return buff;
#  873|   }
#  874|   

Error: CPPCHECK_WARNING (CWE-476): [#def3]
pycdio-2.1.1/swig/pycdio_wrap.c:1901: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1899|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1900|       /* the klass element */
# 1901|->     data->klass = obj;
# 1902|       SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: CPPCHECK_WARNING (CWE-476): [#def4]
pycdio-2.1.1/swig/pycdio_wrap.c:1902: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1900|       /* the klass element */
# 1901|       data->klass = obj;
# 1902|->     SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */
# 1904|       if (PyClass_Check(obj)) {

Error: COMPILER_WARNING: [#def5]
pycdio-2.1.1/swig/pycdio_wrap.c: scope_hint: In function ‘get_hwinfo’
pycdio-2.1.1/swig/pycdio_wrap.c:4263:5: warning[-Wstringop-truncation]: ‘strncpy’ output may be truncated copying 8 bytes from a string of length 8
# 4263 |     strncpy(vendor, hw_info.psz_vendor, CDIO_MMC_HW_VENDOR_LEN);
#      |     ^
# 4261|   
# 4262|     if (b_got_hwinfo) {
# 4263|->     strncpy(vendor, hw_info.psz_vendor, CDIO_MMC_HW_VENDOR_LEN);
# 4264|       strncpy(model, hw_info.psz_model, CDIO_MMC_HW_MODEL_LEN);
# 4265|       strncpy(revision, hw_info.psz_revision, CDIO_MMC_HW_REVISION_LEN);

Error: COMPILER_WARNING: [#def6]
pycdio-2.1.1/swig/pycdio_wrap.c:4264:5: warning[-Wstringop-truncation]: ‘strncpy’ output may be truncated copying 16 bytes from a string of length 16
# 4264 |     strncpy(model, hw_info.psz_model, CDIO_MMC_HW_MODEL_LEN);
#      |     ^
# 4262|     if (b_got_hwinfo) {
# 4263|       strncpy(vendor, hw_info.psz_vendor, CDIO_MMC_HW_VENDOR_LEN);
# 4264|->     strncpy(model, hw_info.psz_model, CDIO_MMC_HW_MODEL_LEN);
# 4265|       strncpy(revision, hw_info.psz_revision, CDIO_MMC_HW_REVISION_LEN);
# 4266|     }

Error: COMPILER_WARNING: [#def7]
pycdio-2.1.1/swig/pycdio_wrap.c:4265:5: warning[-Wstringop-truncation]: ‘strncpy’ output may be truncated copying 4 bytes from a string of length 4
# 4265 |     strncpy(revision, hw_info.psz_revision, CDIO_MMC_HW_REVISION_LEN);
#      |     ^
# 4263|       strncpy(vendor, hw_info.psz_vendor, CDIO_MMC_HW_VENDOR_LEN);
# 4264|       strncpy(model, hw_info.psz_model, CDIO_MMC_HW_MODEL_LEN);
# 4265|->     strncpy(revision, hw_info.psz_revision, CDIO_MMC_HW_REVISION_LEN);
# 4266|     }
# 4267|   

Error: COMPILER_WARNING (CWE-704): [#def8]
pycdio-2.1.1/swig/pycdio_wrap.c: scope_hint: In function ‘_wrap_cdtext_list_languages_v2’
pycdio-2.1.1/swig/pycdio_wrap.c:5791:54: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘cdtext_list_languages_v2’ discards ‘const’ qualifier from pointer target type
# 5791 |   result = (cdtext_lang_t *)cdtext_list_languages_v2((cdtext_t const *)arg1);
#      |                                                      ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/cdio/cdio.h:59: included_from: Included from here.
pycdio-2.1.1/swig/pycdio_wrap.c:3485: included_from: Included from here.
/usr/include/cdio/cdtext.h:395:51: note: expected ‘cdtext_t *’ {aka ‘struct cdtext_s *’} but argument is of type ‘const cdtext_t *’ {aka ‘const struct cdtext_s *’}
#  395 | cdtext_lang_t *cdtext_list_languages_v2(cdtext_t *p_cdtext);
#      |                                         ~~~~~~~~~~^~~~~~~~
# 5789|     }
# 5790|     arg1 = (cdtext_t *)(argp1);
# 5791|->   result = (cdtext_lang_t *)cdtext_list_languages_v2((cdtext_t const *)arg1);
# 5792|     resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
# 5793|     return resultobj;

Error: COMPILER_WARNING (CWE-704): [#def9]
pycdio-2.1.1/swig/pycdio_wrap.c:5791:54: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘cdtext_list_languages_v2’ discards ‘const’ qualifier from pointer target type
# 5789|     }
# 5790|     arg1 = (cdtext_t *)(argp1);
# 5791|->   result = (cdtext_lang_t *)cdtext_list_languages_v2((cdtext_t const *)arg1);
# 5792|     resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
# 5793|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
pycdio-2.1.1/swig/pyiso9660_wrap.c:724:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘iter’
pycdio-2.1.1/swig/pyiso9660_wrap.c:5441:22: enter_function: entry to ‘_wrap_pathname_valid_p’
pycdio-2.1.1/swig/pyiso9660_wrap.c:5451:6: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
pycdio-2.1.1/swig/pyiso9660_wrap.c:5453:10: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:5453:10: call_function: calling ‘SWIG_AsCharPtrAndSize’ from ‘_wrap_pathname_valid_p’
#  722|     swig_module_info *iter = start;
#  723|     do {
#  724|->     if (iter->size) {
#  725|         size_t l = 0;
#  726|         size_t r = iter->size - 1;

Error: CPPCHECK_WARNING (CWE-457): [#def11]
pycdio-2.1.1/swig/pyiso9660_wrap.c:872: warning[uninitvar]: Uninitialized variable: buff
#  870|       *r = 0;
#  871|     }
#  872|->   return buff;
#  873|   }
#  874|   

Error: CPPCHECK_WARNING (CWE-476): [#def12]
pycdio-2.1.1/swig/pyiso9660_wrap.c:1901: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1899|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1900|       /* the klass element */
# 1901|->     data->klass = obj;
# 1902|       SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: CPPCHECK_WARNING (CWE-476): [#def13]
pycdio-2.1.1/swig/pyiso9660_wrap.c:1902: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1900|       /* the klass element */
# 1901|       data->klass = obj;
# 1902|->     SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */
# 1904|       if (PyClass_Check(obj)) {

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-160.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-namepython-pycdio-2.1.1-7.fc44
store-results-to/tmp/tmpywbtonwr/python-pycdio-2.1.1-7.fc44.tar.xz
time-created2025-10-28 20:10:34
time-finished2025-10-28 20:12:05
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpywbtonwr/python-pycdio-2.1.1-7.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpywbtonwr/python-pycdio-2.1.1-7.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9