Skip to content

demux: guard against NULL iter->chunk.bytes in NextChunk/PrevChunk - #23

Closed
PRAVIN-952006 wants to merge 1 commit into
webmproject:mainfrom
PRAVIN-952006:fix-demux-next-prev-chunk-null
Closed

PRAVIN-952006 wants to merge 1 commit into
webmproject:mainfrom
PRAVIN-952006:fix-demux-next-prev-chunk-null

Conversation

@PRAVIN-952006

Copy link
Copy Markdown
Contributor

Summary

  • Adds iter->chunk.bytes != NULL guards in WebPDemuxNextChunk and WebPDemuxPrevChunk (src/demux/demux.c) before performing pointer arithmetic on iter->chunk.bytes, preventing NULL pointer dereference on uninitialized or empty chunk iterators.

Verification

  • Built on Apple Silicon ARM64 (Apple Clang 17, -O2 -Wall -Wextra -Werror) with 0 warnings.
  • Verified with ASan + UBSan: 0 diagnostics.

Check iter->chunk.bytes != NULL in WebPDemuxNextChunk and
WebPDemuxPrevChunk before performing pointer arithmetic on
iter->chunk.bytes to avoid NULL pointer dereference on uninitialized or
empty iterators.
@PRAVIN-952006

Copy link
Copy Markdown
Contributor Author

Closing mirror PR — submitted to Chromium Gerrit per CONTRIBUTING.md: https://chromium-review.googlesource.com/c/webm/libwebp/+/8867389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant