Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-4425

Possible incorrect error reporting "Error locking blob area for persistable item"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Auto Closed
    • 0.18
    • None
    • C++ Broker
    • None
    • Windows

    Description

      In mssql_store module class BlobEncoder has incorrect error reporting.
      In code bellow

      BlobEncoder.cpp
          blob = SafeArrayCreate(VT_UI1, 1, bound);
          if (S_OK != SafeArrayLock(blob)) {
              SafeArrayDestroy(blob);
              blob = 0;
              throw qpid::Exception("Error locking blob area for persistable item");
          }
      

      Exception "Error locking blob area for persistable item" hides possible error in SafeArrayCreate (which is more likely to be happen, cause SafeArrayCreate can fail on out of memory)
      In module BlobEncoder.cpp three similar methods. (BTW may be it's need some refactoring to follow DRY principe& )

      Attachments

        Activity

          People

            shuston Stephen D. Huston
            sviridov_alexey Alexey Sviridov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: