The gridfs api class GridFileBuilder corrupts data.

XMLWordPrintableJSON

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

      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.

            Assignee:
            Andrew Morrow (Inactive)
            Reporter:
            Charles Galambos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: