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

Audit GridFS implementation for correct handling of user-provided and server-provided file lengths and chunk sizes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0-rc0
    • Component/s: Implementation
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      Perl/CXX 2017-03-24

      Description

      From the GridFS spec:

      However, drivers MUST be able to handle existing GridFS files where the length and chunkSize fields might have been stored using a different numeric data type.

      It appears that the initial GridFS implementation does not correctly handle downloads of files where the "chunkSize" element from the files document is stored as a 64-bit integer.

      In addition, the GridFS API should document that users may not specify a chunk size larger than the maximum value for int32_t when uploading files. Currently, the user-provided chunk size value is narrowed to int32_t in the mongocxx::uploader constructor (when sizeof(size_t) is greater than 4 on the user's system). We should audit the rest of the logic surrounding the handling of these values.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: