python-cffi-1.16.0-5.fc41

List of Defects

Error: CLANG_WARNING: [#def1]
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c:973:5: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  971|   read_raw_float_data(char *target, int size)
#  972|   {
#  973|->     _read_raw_data(float);
#  974|       _read_raw_data(double);
#  975|       Py_FatalError("read_raw_float_data: bad float size");

Error: CLANG_WARNING: [#def2]
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c:974:5: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  972|   {
#  973|       _read_raw_data(float);
#  974|->     _read_raw_data(double);
#  975|       Py_FatalError("read_raw_float_data: bad float size");
#  976|       return 0;

Error: CLANG_WARNING: [#def3]
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c:983:5: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  981|   {
#  982|       int size = sizeof(long double);
#  983|->     _read_raw_data(long double);
#  984|       Py_FatalError("read_raw_longdouble_data: bad long double size");
#  985|       return 0;

Error: CLANG_WARNING: [#def4]
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c:994:9: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  992|       if (size == 2*sizeof(float)) {
#  993|           float real_part, imag_part;
#  994|->         memcpy(&real_part, target + 0,             sizeof(float));
#  995|           memcpy(&imag_part, target + sizeof(float), sizeof(float));
#  996|           r.real = real_part;

Error: CLANG_WARNING: [#def5]
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c:1001:9: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  999|       }
# 1000|       if (size == 2*sizeof(double)) {
# 1001|->         memcpy(&r, target, 2*sizeof(double));
# 1002|           return r;
# 1003|       }

Error: CLANG_WARNING: [#def6]
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c:3160:43: warning[core.NullDereference]: Array access (via field 'ob_item') results in a null pointer dereference
# 3158|               argtype = (CTypeDescrObject *)PyTuple_GET_ITEM(signature, 2 + i);
# 3159|           else
# 3160|->             argtype = (CTypeDescrObject *)PyTuple_GET_ITEM(fvarargs, i);
# 3161|   
# 3162|           if (argtype->ct_flags & CT_POINTER) {

Error: COMPILER_WARNING (CWE-477): [#def7]
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c: scope_hint: In function ‘b_do_dlopen’
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c:4532:22: warning[-Wdeprecated-declarations]: ‘Py_FileSystemDefaultEncoding’ is deprecated
/usr/include/python3.13/Python.h:95: included_from: Included from here.
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c:2: included_from: Included from here.
/usr/include/python3.13/fileobject.h:22:46: note: declared here
# 4530|   #endif
# 4531|           if (!PyArg_ParseTuple(args, "et|i:load_library",
# 4532|->                      Py_FileSystemDefaultEncoding, &filename_or_null, &flags))
# 4533|               return NULL;
# 4534|   #if PY_MAJOR_VERSION < 3

Error: CLANG_WARNING: [#def8]
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c:5654:29: warning[core.NullDereference]: Array access (from variable 'elements') results in a null pointer dereference
# 5652|           ffistruct = fb_alloc(fb, sizeof(ffi_type));
# 5653|           if (ffistruct != NULL) {
# 5654|->             elements[nflat] = NULL;
# 5655|               ffistruct->size = ct->ct_size;
# 5656|               ffistruct->alignment = ct->ct_length;

Error: CLANG_WARNING: [#def9]
python-cffi-1.16.0-build/cffi-1.16.0/src/c/_cffi_backend.c:7823:5: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
# 7821|           return NULL;
# 7822|       }
# 7823|->     return result;
# 7824|   }
# 7825|   

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
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-204.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namepython-cffi-1.16.0-5.fc41
store-results-to/tmp/tmpmlfcnsc8/python-cffi-1.16.0-5.fc41.tar.xz
time-created2024-07-03 17:17:10
time-finished2024-07-03 17:18:35
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpmlfcnsc8/python-cffi-1.16.0-5.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpmlfcnsc8/python-cffi-1.16.0-5.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9