[CDRIVER-45] unchecked malloc and realloc in gridfs_store_stream 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: | Major - P3 |
| Reporter: | Jim Meyering | Assignee: | Kyle Banker |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
latest in git |
||
| Issue Links: |
|
||||||||
| Description |
|
In gridfs_store_stream, there are unchecked malloc and realloc calls. if ( to_write < gfs->chunk_len ) { else if (to_write > 0) { gfs->pending_data = (char *)malloc(to_write); memcpy( gfs->pending_data, data, length ); } gfs->pending_len += length; I didn't try to fix it because I suspect the function is incomplete. |
| Comments |
| Comment by Kyle Banker [ 17/Feb/11 ] |
|
Thanks, Jim! |
| Comment by auto [ 17/Feb/11 ] |
|
Author: {u'login': u'banker', u'name': u'Kyle Banker', u'email': u'kylebanker@gmail.com'}Message: |