Uploaded image for project: 'Qt License server'
  1. Qt License server
  2. QLS-1726

Unsafe usage of nlohmann::json::operator[]

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • 3.5.0
    • 3.4.0, 3.3.2
    • None
    • All
    • License server development 51

      Accessing a const object with the reference operator with a missing key is undefined behavior and yields a runtime assertion in nlohmann::json library.

      The codebase should be checked for such usage of the reference operator. Fix is to either use checked access with the at() function or call the contains() function before referencing.

      Usage of reference operator with non-const object is ok as any missing keys are added.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            aswalpit Ashan Walpitage
            arttu.tarkiainen Arttu Tarkiainen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes