Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-32488

pcre SAST five findings: UNINIT in pcre_jit_test.c file

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • rhel-9.5
    • rhel-9.5
    • pcre
    • pcre-8.44-4.el9
    • None
    • None
    • rhel-sst-cs-databases
    • 8
    • 12
    • 7
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

      Here is one of the SAST reports for this bug:

      Error: UNINIT (CWE-457):
      pcre-8.44/pcre_jit_test.c:1172: var_decl: Declaring variable "mark8_1" without initializer.
      pcre-8.44/pcre_jit_test.c:1690: uninit_use: Using uninitialized value "mark8_1".
      # 1688|                   if (is_successful) {
      # 1689|   #ifdef SUPPORT_PCRE8
      # 1690|->                         if (mark8_1 != mark8_2) {
      # 1691|                                   printf("8 bit: Mark value mismatch: [%d] '%s' @ '%s'\n",
      # 1692|                                           total, current->pattern, current->input);
      

      There are five SAST findings similar to this one and each of them can be fixed by adding a check for the "re8", "re16" or "re32" variable as if this variable is true the "mark8_1" and "mark8_2" (16 and 32 variants as well) variables will are initialized.

              ljavorsk Lukas Javorsky
              ljavorsk Lukas Javorsky
              Lukas Javorsky Lukas Javorsky
              Martin Kyral Martin Kyral
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: