Skip to content

STOMP StompSubframeDecoder threws exception while processing PING (empty frame) from client #10678

@Rom1kz

Description

@Rom1kz

Expected behavior

expected to process PING frames to check the client is still active

Actual behavior

when empty frame (just with \n symbol) is received StompSubframeDecoder.decode threws IndexOutOfBoundsException

 private static void skipControlCharacters(ByteBuf buffer) {
         byte b;
         for (;;) {
             b = buffer.readByte();
             if (b != StompConstants.CR && b != StompConstants.LF) {
                 buffer.readerIndex(buffer.readerIndex() - 1);
                 break;
             }
         }
     }

function skipControlCharacters has no readable bytes check of the buffer

Steps to reproduce

build a STOMP server using netty STOMP handlers

Netty version

4.1.52

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions