Uploaded image for project: 'Qpid Dispatch'
  1. Qpid Dispatch
  2. DISPATCH-837

Coverity scan reported errors in Qpid Dispatch master

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • Container
    • None

    Description

      New defect(s) Reported-by: Coverity Scan
      Showing 2 of 2 defect(s)
      
      
      ** CID 181415:  Integer handling issues  (NO_EFFECT)
      /home/kgiusti/work/dispatch/qpid-dispatch/src/parse.c: 679 in qd_parse_annotations_v1()
      
      
      ________________________________________________________________________________________________________
      *** CID 181415:  Integer handling issues  (NO_EFFECT)
      /home/kgiusti/work/dispatch/qpid-dispatch/src/parse.c: 679 in qd_parse_annotations_v1()
      673         // Adjust size of user annotation blob by the size of the router
      674         // annotations
      675         blob_pointer->remaining = user_bytes;
      676         assert(blob_pointer->remaining >= 0);
      677
      678         *blob_item_count = user_entries;
      >>>     CID 181415:  Integer handling issues  (NO_EFFECT)
      >>>     This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "*blob_item_count >= 0U".
      679         assert(*blob_item_count >= 0);
      680         return 0;
      681     }
      682
      683
      684     void qd_parse_annotations(
      
      ** CID 124934:  Resource leaks  (RESOURCE_LEAK)
      /home/kgiusti/work/dispatch/qpid-dispatch/tests/message_test.c: 181 in test_message_properties()
      
      
      ________________________________________________________________________________________________________
      *** CID 124934:  Resource leaks  (RESOURCE_LEAK)
      /home/kgiusti/work/dispatch/qpid-dispatch/tests/message_test.c: 181 in test_message_properties()
      175         qd_message_content_t *content = MSG_CONTENT(msg);
      176
      177         set_content(content, size);
      178
      179         qd_iterator_t *iter = qd_message_field_iterator(msg, QD_FIELD_CORRELATION_ID);
      180         if (!iter) return "Expected iterator for the 'correlation-id' field";
      >>>     CID 124934:  Resource leaks  (RESOURCE_LEAK)
      >>>     Variable "iter" going out of scope leaks the storage it points to.
      181         if (qd_iterator_length(iter) != 13) return "Bad length for correlation-id";
      182         if (!qd_iterator_equal(iter, (const unsigned char *)"correlationId")) {
      183             qd_iterator_free(iter);
      184             return "Invalid correlation-id";
      185         }
      qd_iterator_free(iter);
      
      
      ________________________________________________________________________________________________________
      To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZSbhom32dlDl11LWEm9nX1-2FDm2ydKRp2jKIMEChnF9qYjWDV40qhnoFf9KqJJs5gJ3gKShavCjMfPIUiT4tI2B_ygEXfYGmow-2BVmzDwjZ-2FNe9kh2OIomE8gx57jSnhuvKkhD5r-2FuwH0fl-2FwXX7KhrkDieO4NzlO9xN9LEpbrENIXqKtwQaqm-2BdiI2brzqdeqOrpIQaJyL3h1ujr3VInbvw8MVhjDI-2B596Q0VreTnwuSrves-2BHwPG4I91rQQ-2BoIHGtRlmyagvGjIKf43YJvi2UwBmyrucvGyuEFDNdCo77DmFw-3D-3D
      

      Attachments

        Activity

          People

            gmurthy Ganesh Murthy
            gmurthy Ganesh Murthy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: