Skip to content

Commit 2cd8cab

Browse files
committed
cater for array size marked with -1
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
1 parent 9c782b4 commit 2cd8cab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggingEventVO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE
208208
int argArrayLen = in.readInt();
209209

210210
// Prevent DOS attacks via large or negative arrays
211-
if (argArrayLen < 0 || argArrayLen > ARGUMENT_ARRAY_DESERIALIZATION_LIMIT) {
211+
if (argArrayLen < NULL_ARGUMENT_ARRAY || argArrayLen > ARGUMENT_ARRAY_DESERIALIZATION_LIMIT) {
212212
throw new InvalidObjectException("Argument array length is invalid: " + argArrayLen);
213213
}
214214

0 commit comments

Comments
 (0)