Bug 277661
| Summary: | WebCoreAVFResourceLoader may give more data than requested. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Component: | Media | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Jean-Yves Avenard [:jya]
Found by code review.
https://searchfox.org/wubkat/source/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm#432-446
If the AVAsset requested N bytes and the server responded with X bytes, where X >= N ; we will pass X bytes to the DataRequest.
Additionally, under such circumstances, `bytesToUse` is greater than `remainingLength` and so the instruction `remainingLength -= bytesToUse;` to overflow being an unsigned. And so we will incorrectly expect more data to be received
https://searchfox.org/wubkat/rev/b36cbce69fddb7da33823f316bd8ead5bebee970/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm#459-461
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/133256334>
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/31763
EWS
Committed 301298@main (37c2e6ab592c): <https://commits.webkit.org/301298@main>
Reviewed commits have been landed. Closing PR #31763 and removing active labels.