Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in forEachByte on nested composite bytebuf with leak detection #12790

Merged
merged 1 commit into from Sep 9, 2022

Commits on Sep 9, 2022

  1. Fix bug in forEachByte on nested composite bytebuf with leak detection

    Motivation:
    An NPE could occur when forEachByte was called on nested leak-aware composite byte buffers.
    
    Modification:
    WrappedCompositeByteBuf extends CompositeByteBuf but must delegate all calls to the wrapped instance.
    Add delegation calls for forEachByteAsc0 and forEachByteDesc0.
    Without delegation, those calls would, from an outer composite buffer, go to the composite structure of the wrapper buffer, which have no components.
    
    Result:
    No more NPE when calling forEachByte on nested composite leak-aware buffers.
    
    Fixes netty#12787
    chrisvest committed Sep 9, 2022
    Copy the full SHA
    e189c07 View commit details
    Browse the repository at this point in the history