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

avoid NULL-deref (gridfs_store_stream_init API change)

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None
    • latest from git, Fedora 14, x86_64
    • Minor Change

    Description

      There are two unchecked malloc calls in the void-typed gridfs_store_stream_init function.
      To handle the possibility of NULL return, the function must return non-void. I chose "int"
      in the attached patch.

      Also, it's cleaner to use "strdup" rather than the combination of malloc and strcpy.

      Attachments

        Activity

          People

            kbanker Kyle Banker
            meyering Jim Meyering
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: