Skip to content

Commit

Permalink
refactor: add method that validate framelen non negative
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbus committed Nov 28, 2024
1 parent 1acfcb9 commit 2f7440a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cli/src/main/java/hudson/cli/PlainCLIProtocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ public void run() {
try {
while (true) {
int framelen = readFrameLength();
if (framelen < 0) {
throw new IOException("corrupt stream: negative frame length");
}
validateFrameLength(framelen);
processFrame(framelen);
}
} catch (IOException | RuntimeException x) {
Expand Down

0 comments on commit 2f7440a

Please sign in to comment.