[CDRIVER-2072] Using a filter or projection with empty field names causes a crash when destroying cursor Created: 27/Feb/17 Updated: 28/Mar/17 Resolved: 05/Mar/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | 1.5.1, 1.5.2 |
| Fix Version/s: | 1.5.5, 1.6.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Derick Rethans | Assignee: | Jeremy Mikola |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
When running a query through
See the attached file, which I've compiled with
When running it, it produces a segfault:
I have also attached the backtrace. |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 05/Mar/17 ] |
|
r1.6: https://github.com/mongodb/mongo-c-driver/commit/aadf9bcb416e76e2771de2578bd5013f764b80d2 |
| Comment by Githook User [ 05/Mar/17 ] |
|
Author: {u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}Message: mongoc_cursor_destroy() always attempts to destroy these documents, which would previously crash if they were left uninitialized when an error was reported by _mongoc_cursor_new_with_opts(). |
| Comment by Githook User [ 05/Mar/17 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #425 from jmikola/cdriver-2072
|
| Comment by Githook User [ 05/Mar/17 ] |
|
Author: {u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}Message: mongoc_cursor_destroy() always attempts to destroy these documents, which would previously crash if they were left uninitialized when an error was reported by _mongoc_cursor_new_with_opts(). |
| Comment by Jeremy Mikola [ 03/Mar/17 ] |
| Comment by Jeremy Mikola [ 03/Mar/17 ] |
|
Verified that this is also an issue when the filter document contains empty field names. |