commit | 949e0ba648ab0e8173ed4755e0158966acd1efc2 | [log] [tgz] |
---|---|---|
author | Holger Hans Peter Freyther <zecke@selfish.org> | Thu Oct 14 17:21:04 2010 +0200 |
committer | Holger Hans Peter Freyther <zecke@selfish.org> | Thu Oct 14 22:05:34 2010 +0200 |
tree | 6572852e96a56763a251304142f55a550a1e66ae | |
parent | 69cfa179ef9a1ae787b4e8134cfaef670cd31095 [diff] |
ipaccess: memset the tlv_parsed structure before parsing Make sure the tlv_parsed structure is initialized properly, otherwise we might detect a tag that should not be present.
diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c index 4968e80..74c850c 100644 --- a/openbsc/src/input/ipaccess.c +++ b/openbsc/src/input/ipaccess.c
@@ -101,6 +101,8 @@ u_int8_t t_tag; u_int8_t *cur = buf; + memset(dec, 0, sizeof(*dec)); + while (cur < buf + len) { t_len = *cur++; t_tag = *cur++;