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

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

    XMLWordPrintable

Details

    • All

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes