Bug 294896
| Summary: | [GTK][WPE] MemoryMappedGPUBuffer::mapIfNeeded() does not handle mmap() errors properly | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nikolas Zimmermann <zimmermann> |
| Component: | WPE WebKit | Assignee: | Nikolas Zimmermann <zimmermann> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bugs-noreply |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Nikolas Zimmermann
If mmap() fails MAP_FAILED is returned, which we store as m_mappedData (e.g. (void*)-1). We later verify if the mapping succeeded, by checking if m_mappedData is non-null, and incorrectly assume we can use memcpy() to alter the mapped region. Instead reset m_mappedData to nullptr, if mmap() returned MAP_FAILED.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Nikolas Zimmermann
Pull request: https://github.com/WebKit/WebKit/pull/47111
EWS
Committed 296562@main (2111c09233db): <https://commits.webkit.org/296562@main>
Reviewed commits have been landed. Closing PR #47111 and removing active labels.