Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-510

Fix for GridFS file seek if page == NULL

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.0-beta0
    • Affects Version/s: None
    • Component/s: GridFS
    • None

      The latest gridfs fix doesn't cover case when page == NULL.

      if (offset / file->chunk_size != file->pos / file->chunk_size) {
        ...
      } else {
         _mongoc_gridfs_file_page_seek (file->page, offset % file->chunk_size);
      }
      
      

      If page == NULL, pos == 0 and offset < chunk_size it will try to seek in NULL page

            Assignee:
            kyle.suarez@mongodb.com Kyle Suarez
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: