Permalink
Browse files

fix Babel type 11 TLV length check

RFC6126 4.3. TLV Format: "If the body is longer than the expected length
of a given type of TLV, any extra data MUST be silently ignored."
  • Loading branch information...
1 parent 33808c6 commit 4279f79e8e8c21349cf3b075568d3b98776f7c0b @infrastation infrastation committed Jun 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 print-babel.c
View
@@ -401,7 +401,7 @@ babel_print_v2(const u_char *cp, u_int length) {
printf(" pcts");
else {
printf("\n\tPC/TS ");
- if(len != 6) goto corrupt;
+ if(len < 6) goto corrupt;
printf("packet counter %u timestamp %u", EXTRACT_16BITS(message + 2),
EXTRACT_32BITS (message + 4));
}

0 comments on commit 4279f79

Please sign in to comment.