Skip to content
Commit bbb7bace authored by Colin Ian King's avatar Colin Ian King Committed by Martin K. Petersen
Browse files

snic: correctly check for array overrun on overly long version number



The snic version number is expected to be 4 decimals in the form like a
netmask string with each number stored in an element in array v.
However, there is an off-by-one check on the number of elements in v
allowing one to pass a 5 decimal version number causing v[4] to be
referenced, causing a buffer overrun.  Fix the off-by-one error by
comparing to i > 3 rather than 4.

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarShane Seymour <shane.seymour@hpe.com>
Reviewed-by: default avatarEwan Milne <emilne@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a6d24143
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment