Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-17395

Unsafe code in tokenserializer.hpp

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.4.0
    • Fix Version/s: 6.4.0
    • Component/s: ESP
    • Labels:
      None

      Description

      Spotted this code when looking at something else:

              case 'f': case 'F':
                  if (memicmp(ptr + 1, "alse", 4) == 0)
      

      ptr here is (I assume) a null-terminated string - no length information is being passed - but there is no check that it points to a string of at least 4 characters here. Were ptr to point to a string of less than 4 chars that happened to be at the end of a page, this code would segfault.

        Attachments

          Activity

            People

            • Assignee:
              richardkchapman Richard Chapman
              Reporter:
              richardkchapman Richard Chapman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: