Commit fb0bac6
### Rationale for this change
Fixing: #48311
### What changes are included in this PR?
Applied fix from #48311 and added test
### Are these changes tested?
Yes, added test, without my patch test fails with debug check:
```cpp
Note: Google Test filter = TestBufferedInputStream.PeekAfterExhaustingBuffer
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TestBufferedInputStream
[ RUN ] TestBufferedInputStream.PeekAfterExhaustingBuffer
/Users/chegoryu/Junk/git/arrow/cpp/src/arrow/io/buffered.cc:337: Check failed: buffer_->size() - buffer_pos_ >= nbytes
```
### Are there any user-facing changes?
No, this PR fixes a bug
* GitHub Issue: #48311
Lead-authored-by: Egor Chunaev <ch.egor.yu@gmail.com>
Co-authored-by: mwish <maplewish117@gmail.com>
Co-authored-by: chegoryu <ch.egor.yu@gmail.com>
Signed-off-by: mwish <maplewish117@gmail.com>
1 parent d65eb94 commit fb0bac6
2 files changed
Lines changed: 44 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
| |||
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
| 301 | + | |
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
303 | | - | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
| 308 | + | |
306 | 309 | | |
307 | 310 | | |
308 | 311 | | |
| |||
311 | 314 | | |
312 | 315 | | |
313 | 316 | | |
314 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
315 | 322 | | |
316 | 323 | | |
317 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
517 | 550 | | |
518 | 551 | | |
519 | 552 | | |
| |||
0 commit comments