Commit 79964c9
committed
CDRIVER-5515 fix assert when legacy exhaust cursor receives no documents (#1562)
* add regression test
Create an exhaust cursor with empty results. Fails an assertion when using legacy op codes.
* CDRIVER-5515 handle NULL for OP_REPLY documents
Avoids an assertion failure in bson_reader_new_from_data if a legacy
exhaust cursor receives an empty batch of documents.1 parent cc8754a commit 79964c9
File tree
2 files changed
+57
-6
lines changed- src/libmongoc
- src/mongoc
- tests
2 files changed
+57
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
248 | | - | |
249 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
250 | 255 | | |
251 | 256 | | |
252 | 257 | | |
| |||
634 | 639 | | |
635 | 640 | | |
636 | 641 | | |
637 | | - | |
638 | | - | |
639 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
640 | 650 | | |
641 | 651 | | |
642 | 652 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
378 | 417 | | |
379 | 418 | | |
380 | 419 | | |
| |||
795 | 834 | | |
796 | 835 | | |
797 | 836 | | |
| 837 | + | |
| 838 | + | |
798 | 839 | | |
799 | 840 | | |
800 | 841 | | |
| |||
0 commit comments