Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/cbuf.c: scope_hint: In function 'char_buf_new' libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/cbuf.c:36:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'cbuf' # 34| { # 35| struct char_buf* cbuf = (struct char_buf*)malloc(sizeof(struct char_buf)); # 36|-> cbuf->capacity = 256; # 37| cbuf->length = 0; # 38| cbuf->data = (unsigned char*)malloc(cbuf->capacity); Error: GCC_ANALYZER_WARNING (CWE-688): [#def2] libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/collection.c: scope_hint: In function 'collection_copy' libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/collection.c:100:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL '*dest.list' where non-null expected <built-in>: note: argument 1 of '__builtin_memcpy' must be non-null # 98| dest->capacity = src->capacity; # 99| dest->list = malloc(sizeof(void*) * src->capacity); # 100|-> memcpy(dest->list, src->list, sizeof(void*) * src->capacity); # 101| } Error: GCC_ANALYZER_WARNING (CWE-688): [#def3] libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/opack.c: scope_hint: In function 'opack_decode_obj' libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/opack.c:348:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'str' where non-null expected <built-in>: note: argument 1 of '__builtin_strncpy' must be non-null # 346| } # 347| char* str = malloc(slen+1); # 348|-> strncpy(str, (const char*)*p, slen); # 349| str[slen] = '\0'; # 350| *plist_out = plist_new_string(str); Error: CPPCHECK_WARNING (CWE-758): [#def4] libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/sha512.c:110: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 108| /* fill W[16..79] */ # 109| for (i = 16; i < 80; i++) { # 110|-> W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]; # 111| } # 112| Error: GCC_ANALYZER_WARNING (CWE-476): [#def5] libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/tlv.c: scope_hint: In function 'tlv_buf_new' libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/tlv.c:38:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'tlv' # 36| { # 37| tlv_buf_t tlv = malloc(sizeof(struct tlv_buf)); # 38|-> tlv->capacity = 1024; # 39| tlv->length = 0; # 40| tlv->data = malloc(tlv->capacity); Error: GCC_ANALYZER_WARNING (CWE-688): [#def6] libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/utils.c: scope_hint: In function 'string_build_path' libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/utils.c:181:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'out' where non-null expected <built-in>: note: argument 1 of '__builtin_strcpy' must be non-null # 179| # 180| char* out = (char*)malloc(len); # 181|-> strcpy(out, elem); # 182| # 183| va_start(args, elem); Error: GCC_ANALYZER_WARNING (CWE-688): [#def7] libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/utils.c: scope_hint: In function 'string_toupper' libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/utils.c:220:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'res' where non-null expected <built-in>: note: argument 1 of '__builtin_strlen' must be non-null # 218| char *res = strdup(str); # 219| size_t i; # 220|-> for (i = 0; i < strlen(res); i++) { # 221| res[i] = toupper(res[i]); # 222| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/utils.c: scope_hint: In function 'generate_uuid' libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/utils.c:245:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'uuid' libimobiledevice-glue-1.3.1-build/libimobiledevice-glue-1.3.1/src/utils.c: scope_hint: In function 'generate_uuid' # 243| continue; # 244| } # 245|-> uuid[i] = chars[get_rand(0, 16)]; # 246| } # 247|
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-226.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | libimobiledevice-glue-1.3.1-1.fc42 |
store-results-to | /tmp/tmp00qllasb/libimobiledevice-glue-1.3.1-1.fc42.tar.xz |
time-created | 2024-11-13 01:31:51 |
time-finished | 2024-11-13 01:33:03 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp00qllasb/libimobiledevice-glue-1.3.1-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp00qllasb/libimobiledevice-glue-1.3.1-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |