pcre2-10.43-1.fc41

List of Defects

Error: CLANG_WARNING: [#def1]
pcre2-10.43/src/pcre2_dfa_match.c:3061:11: warning[deadcode.DeadStores]: Value stored to 'codevalue' is never read
# 3059|             {
# 3060|             allow_zero = TRUE;
# 3061|->           codevalue = *(++code);  /* Codevalue will be one of above BRAs */
# 3062|             }
# 3063|           else allow_zero = FALSE;

Error: CLANG_WARNING: [#def2]
pcre2-10.43/src/pcre2_jit_test.c:1510:10: warning[deadcode.DeadStores]: Although the value stored to 'return_value' is used in the enclosing expression, the value is never actually read from 'return_value'
# 1508|   				/* All results must be the same. */
# 1509|   #ifdef SUPPORT_PCRE2_8
# 1510|-> 				if ((return_value = return_value8[0]) != return_value8[1]) {
# 1511|   					printf("\n8 bit: Return value differs(J8:%d,I8:%d): [%d] '%s' @ '%s'\n",
# 1512|   						return_value8[0], return_value8[1], total, current->pattern, current->input);

Error: CLANG_WARNING: [#def3]
pcre2-10.43/src/pcre2_jit_test.c:1517:10: warning[deadcode.DeadStores]: Although the value stored to 'return_value' is used in the enclosing expression, the value is never actually read from 'return_value'
# 1515|   #endif
# 1516|   #ifdef SUPPORT_PCRE2_16
# 1517|-> 				if ((return_value = return_value16[0]) != return_value16[1]) {
# 1518|   					printf("\n16 bit: Return value differs(J16:%d,I16:%d): [%d] '%s' @ '%s'\n",
# 1519|   						return_value16[0], return_value16[1], total, current->pattern, current->input);

Error: CLANG_WARNING: [#def4]
pcre2-10.43/src/pcre2_match.c:5995:66: warning[core.NullDereference]: Access to field 'eptr' results in a dereference of a null pointer (loaded from variable 'P')
# 5993|   
# 5994|         case OP_ASSERTBACK_NA:
# 5995|->       if (branch_start[1 + LINK_SIZE] == OP_VREVERSE && Feptr != P->eptr)
# 5996|           RRETURN(MATCH_NOMATCH);
# 5997|         /* Fall through */

Error: CLANG_WARNING: [#def5]
pcre2-10.43/src/pcre2_match.c:6001:15: warning[core.NullDereference]: Access to field 'eptr' results in a dereference of a null pointer (loaded from variable 'P')
# 5999|         case OP_ASSERT_NA:
# 6000|         if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr;
# 6001|->       Feptr = P->eptr;
# 6002|         break;
# 6003|   

Error: CLANG_WARNING: [#def6]
pcre2-10.43/src/pcre2_match.c:6009:66: warning[core.NullDereference]: Access to field 'eptr' results in a dereference of a null pointer (loaded from variable 'P')
# 6007|   
# 6008|         case OP_ASSERTBACK:
# 6009|->       if (branch_start[1 + LINK_SIZE] == OP_VREVERSE && Feptr != P->eptr)
# 6010|           RRETURN(MATCH_NOMATCH);
# 6011|         /* Fall through */

Error: CLANG_WARNING: [#def7]
pcre2-10.43/src/pcre2_match.c:6015:15: warning[core.NullDereference]: Access to field 'eptr' results in a dereference of a null pointer (loaded from variable 'P')
# 6013|         case OP_ASSERT:
# 6014|         if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr;
# 6015|->       Feptr = P->eptr;
# 6016|         /* Fall through */
# 6017|   

Error: CLANG_WARNING: [#def8]
pcre2-10.43/src/pcre2_match.c:6027:22: warning[core.NullDereference]: Access to field 'ecode' results in a dereference of a null pointer (loaded from variable 'P')
# 6025|         for (;;)
# 6026|           {
# 6027|->         uint32_t y = GET(P->ecode,1);
# 6028|           if ((P->ecode)[y] != OP_ALT) break;
# 6029|           P->ecode += y;

Error: CLANG_WARNING: [#def9]
pcre2-10.43/src/pcre2_match.c:6027:26: warning[core.NullDereference]: Access to field 'ecode' results in a dereference of a null pointer (loaded from variable 'P')
# 6025|         for (;;)
# 6026|           {
# 6027|->         uint32_t y = GET(P->ecode,1);
# 6028|           if ((P->ecode)[y] != OP_ALT) break;
# 6029|           P->ecode += y;

Error: CLANG_WARNING: [#def10]
pcre2-10.43/src/pcre2_match.c:6038:66: warning[core.NullDereference]: Access to field 'eptr' results in a dereference of a null pointer (loaded from variable 'P')
# 6036|   
# 6037|         case OP_ASSERTBACK_NOT:
# 6038|->       if (branch_start[1 + LINK_SIZE] == OP_VREVERSE && Feptr != P->eptr)
# 6039|           RRETURN(MATCH_NOMATCH);
# 6040|         /* Fall through */

Error: CLANG_WARNING: [#def11]
pcre2-10.43/src/pcre2_match.c:6050:29: warning[core.NullDereference]: Access to field 'eptr' results in a dereference of a null pointer (loaded from variable 'P')
# 6048|   
# 6049|         case OP_SCRIPT_RUN:
# 6050|->       if (!PRIV(script_run)(P->eptr, Feptr, utf)) RRETURN(MATCH_NOMATCH);
# 6051|         break;
# 6052|   

Error: CLANG_WARNING: [#def12]
pcre2-10.43/src/pcre2_match.c:6068:9: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 6066|           {
# 6067|           P = (heapframe *)((char *)N - frame_size);
# 6068|->         memcpy((char *)F + offsetof(heapframe, ovector), P->ovector,
# 6069|             Foffset_top * sizeof(PCRE2_SIZE));
# 6070|           Foffset_top = P->offset_top;

Error: CLANG_WARNING: [#def13]
pcre2-10.43/src/pcre2_match.c:6081:26: warning[core.NullDereference]: Access to field 'eptr' results in a dereference of a null pointer (loaded from variable 'P')
# 6079|         offset = (number << 1) - 2;
# 6080|         Fcapture_last = number;
# 6081|->       Fovector[offset] = P->eptr - mb->start_subject;
# 6082|         Fovector[offset+1] = Feptr - mb->start_subject;
# 6083|         if (offset >= Foffset_top) Foffset_top = offset + 2;

Error: GCC_ANALYZER_WARNING (CWE-131): [#def14]
pcre2-10.43/src/pcre2_substitute.c: scope_hint: In function 'pcre2_substitute_16'
pcre2-10.43/src/pcre2_substitute.c:513:13: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
pcre2-10.43/src/pcre2_internal.h:161: included_from: Included from here.
pcre2-10.43/src/pcre2_substitute.c:46: included_from: Included from here.
pcre2-10.43/src/pcre2.h:810:25: note: in definition of macro 'PCRE2_JOIN'
pcre2-10.43/src/pcre2.h:991:25: note: in expansion of macro 'PCRE2_GLUE'
pcre2-10.43/src/pcre2.h:868:47: note: in expansion of macro 'PCRE2_SUFFIX'
pcre2-10.43/src/pcre2_substitute.c:320:11: note: in expansion of macro 'pcre2_get_ovector_pointer'
pcre2-10.43/src/pcre2.h:810:25: note: in definition of macro 'PCRE2_JOIN'
pcre2-10.43/src/pcre2.h:991:25: note: in expansion of macro 'PCRE2_GLUE'
pcre2-10.43/src/pcre2.h:879:47: note: in expansion of macro 'PCRE2_SUFFIX'
pcre2-10.43/src/pcre2_substitute.c:389:13: note: in expansion of macro 'pcre2_match'
#  511|       /* If at the end of a nested substring, pop the stack. */
#  512|   
#  513|->     if (ptr >= repend)
#  514|         {
#  515|         if (ptrstackptr == 0) break;       /* End of replacement string */

Error: CPPCHECK_WARNING (CWE-758): [#def15]
pcre2-10.43/src/pcre2grep.c:1520: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
# 1518|         }
# 1519|       }
# 1520|->   break;
# 1521|   
# 1522|     case PCRE2_NEWLINE_ANYCRLF:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
pcre2-10.43/src/pcre2grep.c: scope_hint: In function ‘main’
pcre2-10.43/src/pcre2grep.c:4065:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘op’
# 4063|     something in the PCRE options. */
# 4064|   
# 4065|->   if (op->type == OP_NODATA)
# 4066|       {
# 4067|       pcre2_options = handle_option(op->one_char, pcre2_options);

Error: CLANG_WARNING: [#def17]
pcre2-10.43/src/pcre2posix.c:235:39: warning[core.NullDereference]: Access to field 're_erroffset' results in a dereference of a null pointer (loaded from variable 'preg')
#  233|         /* pre C99 snprintf returns used, so redo ret to fix that */
#  234|   
#  235|->       ret = message_len(message, (int)preg->re_erroffset);
#  236|       }
#  237|   } while (0);

Scan Properties

analyzer-version-clang18.1.3
analyzer-version-cppcheck2.13.0
analyzer-version-gcc14.0.1
analyzer-version-gcc-analyzer14.0.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-117.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namepcre2-10.43-1.fc41
store-results-to/tmp/tmp72van7eh/pcre2-10.43-1.fc41.tar.xz
time-created2024-04-22 11:13:08
time-finished2024-04-22 11:17:16
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp72van7eh/pcre2-10.43-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp72van7eh/pcre2-10.43-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9