[CDRIVER-43] avoid NULL-deref (gridfs_store_stream_init API change) Created: 17/Feb/11 Updated: 03/May/17 Resolved: 17/Feb/11 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jim Meyering | Assignee: | Kyle Banker |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
latest from git, Fedora 14, x86_64 |
||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||
| Description |
|
There are two unchecked malloc calls in the void-typed gridfs_store_stream_init function. Also, it's cleaner to use "strdup" rather than the combination of malloc and strcpy. |
| Comments |
| Comment by Kyle Banker [ 17/Feb/11 ] |
|
I went ahead and linked this to the more specific cases you opened. |
| Comment by Kyle Banker [ 17/Feb/11 ] |
|
Thanks. I'll commit fixes for these today and will be changing the API somewhat. gridfs_store_stream_init is still a prototype at this point. |