Task #91902 - python-pycdio-2.1.1-7.fc44/scan-results.err
back to task #91902download
Error: GCC_ANALYZER_WARNING (CWE-476):
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):
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):
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):
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:
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:
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:
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):
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):
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):
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):
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):
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: GCC_ANALYZER_WARNING (CWE-476):
pycdio-2.1.1/swig/pyiso9660_wrap.c:1901:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘data’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4404:22: enter_function: entry to ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: return_function: returning to ‘imaxdiv_t_swigregister’ from ‘SWIG_Python_UnpackTuple’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:48: call_function: calling ‘SwigPyClientData_New’ from ‘imaxdiv_t_swigregister’
# 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):
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)) {
Error: GCC_ANALYZER_WARNING (CWE-401):
pycdio-2.1.1/swig/pyiso9660_wrap.c:1904:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4404:22: enter_function: entry to ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: return_function: returning to ‘imaxdiv_t_swigregister’ from ‘SWIG_Python_UnpackTuple’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:48: call_function: calling ‘SwigPyClientData_New’ from ‘imaxdiv_t_swigregister’
# 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)) {
# 1905| data->newraw = 0;
# 1906| SWIG_Py_INCREF(obj);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycdio-2.1.1/swig/pyiso9660_wrap.c:1909:22: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4404:22: enter_function: entry to ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: return_function: returning to ‘imaxdiv_t_swigregister’ from ‘SWIG_Python_UnpackTuple’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:48: call_function: calling ‘SwigPyClientData_New’ from ‘imaxdiv_t_swigregister’
# 1907| data->newargs = obj;
# 1908| } else {
# 1909|-> data->newraw = PyObject_GetAttrString(data->klass, "__new__");
# 1910| if (data->newraw) {
# 1911| data->newargs = PyTuple_New(1);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycdio-2.1.1/swig/pyiso9660_wrap.c:1911:25: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4404:22: enter_function: entry to ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: return_function: returning to ‘imaxdiv_t_swigregister’ from ‘SWIG_Python_UnpackTuple’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:48: call_function: calling ‘SwigPyClientData_New’ from ‘imaxdiv_t_swigregister’
# 1909| data->newraw = PyObject_GetAttrString(data->klass, "__new__");
# 1910| if (data->newraw) {
# 1911|-> data->newargs = PyTuple_New(1);
# 1912| if (data->newargs) {
# 1913| SWIG_Py_INCREF(obj);
Error: GCC_ANALYZER_WARNING (CWE-401):
pycdio-2.1.1/swig/pyiso9660_wrap.c:1927:21: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4404:22: enter_function: entry to ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: return_function: returning to ‘imaxdiv_t_swigregister’ from ‘SWIG_Python_UnpackTuple’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:48: call_function: calling ‘SwigPyClientData_New’ from ‘imaxdiv_t_swigregister’
# 1925| }
# 1926| /* the destroy method, aka as the C++ delete method */
# 1927|-> data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
# 1928| if (PyErr_Occurred()) {
# 1929| PyErr_Clear();
Error: GCC_ANALYZER_WARNING (CWE-401):
pycdio-2.1.1/swig/pyiso9660_wrap.c:1928:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4404:22: enter_function: entry to ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: return_function: returning to ‘imaxdiv_t_swigregister’ from ‘SWIG_Python_UnpackTuple’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:48: call_function: calling ‘SwigPyClientData_New’ from ‘imaxdiv_t_swigregister’
# 1926| /* the destroy method, aka as the C++ delete method */
# 1927| data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
# 1928|-> if (PyErr_Occurred()) {
# 1929| PyErr_Clear();
# 1930| data->destroy = 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
pycdio-2.1.1/swig/pyiso9660_wrap.c:1929:7: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4404:22: enter_function: entry to ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘imaxdiv_t_swigregister’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:8: return_function: returning to ‘imaxdiv_t_swigregister’ from ‘SWIG_Python_UnpackTuple’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4406:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4407:48: call_function: calling ‘SwigPyClientData_New’ from ‘imaxdiv_t_swigregister’
# 1927| data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
# 1928| if (PyErr_Occurred()) {
# 1929|-> PyErr_Clear();
# 1930| data->destroy = 0;
# 1931| }
Error: GCC_ANALYZER_WARNING (CWE-401):
pycdio-2.1.1/swig/pyiso9660_wrap.c:4463:15: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 16)’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4439:22: enter_function: entry to ‘_wrap_imaxdiv’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4451:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_imaxdiv’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4451:8: return_function: returning to ‘_wrap_imaxdiv’ from ‘SWIG_Python_UnpackTuple’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4451:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4452:12: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4452:12: call_function: calling ‘SWIG_AsVal_long_SS_long’ from ‘_wrap_imaxdiv’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4452:12: return_function: returning to ‘_wrap_imaxdiv’ from ‘SWIG_AsVal_long_SS_long’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4453:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4456:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4458:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4461:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4463:15: acquire_memory: allocated here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4463:15: call_function: calling ‘SWIG_Python_NewPointerObj’ from ‘_wrap_imaxdiv’
# 4461| arg2 = (intmax_t)(val2);
# 4462| result = imaxdiv(arg1,arg2);
# 4463|-> resultobj = SWIG_NewPointerObj((imaxdiv_t *)memcpy((imaxdiv_t *)calloc(1,sizeof(imaxdiv_t)),&result,sizeof(imaxdiv_t)), SWIGTYPE_p_imaxdiv_t, SWIG_POINTER_OWN | 0 );
# 4464| return resultobj;
# 4465| fail:
Error: GCC_ANALYZER_WARNING (CWE-476):
pycdio-2.1.1/swig/pyiso9660_wrap.c:4463:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 16)’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4439:22: enter_function: entry to ‘_wrap_imaxdiv’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4451:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_imaxdiv’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4451:8: return_function: returning to ‘_wrap_imaxdiv’ from ‘SWIG_Python_UnpackTuple’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4451:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4452:12: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4452:12: call_function: calling ‘SWIG_AsVal_long_SS_long’ from ‘_wrap_imaxdiv’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4452:12: return_function: returning to ‘_wrap_imaxdiv’ from ‘SWIG_AsVal_long_SS_long’
pycdio-2.1.1/swig/pyiso9660_wrap.c:4453:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4456:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4458:6: branch_false: following ‘false’ branch...
pycdio-2.1.1/swig/pyiso9660_wrap.c:4461:3: branch_false: ...to here
pycdio-2.1.1/swig/pyiso9660_wrap.c:4463:15: acquire_memory: this call could return NULL
pycdio-2.1.1/swig/pyiso9660_wrap.c:4463:15: danger: ‘calloc(1, 16)’ could be NULL: unchecked value from [(35)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/34)
# 4461| arg2 = (intmax_t)(val2);
# 4462| result = imaxdiv(arg1,arg2);
# 4463|-> resultobj = SWIG_NewPointerObj((imaxdiv_t *)memcpy((imaxdiv_t *)calloc(1,sizeof(imaxdiv_t)),&result,sizeof(imaxdiv_t)), SWIGTYPE_p_imaxdiv_t, SWIG_POINTER_OWN | 0 );
# 4464| return resultobj;
# 4465| fail: