Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-603

The gridfs api class GridFileBuilder corrupts data.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • legacy-1.0.3
    • Affects Version/s: legacy-1.0.2
    • Component/s: API

      The class mongo::GridFileBuilder, drops data from the stream, corrupting the data stored.

      Using mongo::GridFileBuilder:appendChunk to append data of arbitrary block sizes drops part of the blocks. The function call _appendChunk( data + size, length - size,false) is used without checking if there is any further data to add to the pending buffer.

      Attached is a patch to fix the issue.

        1. mongogridfs.patch
          0.8 kB
          Charles Galambos

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            craftit Charles Galambos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: