Skip to content

Commit 14a71d0

Browse files
committed
cater for array size marked with -1
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent b8eac23 commit 14a71d0

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

+1-1
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)