From 7cabfe9fe9f9d1f88d08f642cc284fe3156803d3 Mon Sep 17 00:00:00 2001 From: Yonghong Song Date: Wed, 7 Oct 2015 05:16:15 -0700 Subject: [PATCH] Fix an uninitialized variable access in test_clang Signed-off-by: Yonghong Song --- tests/cc/test_clang_complex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cc/test_clang_complex.c b/tests/cc/test_clang_complex.c index ed1f231..0ddc88a 100644 --- a/tests/cc/test_clang_complex.c +++ b/tests/cc/test_clang_complex.c @@ -100,8 +100,9 @@ int handle_packet(struct __sk_buff *skb) { goto EOP; } - struct ip_t *ip = cursor_advance(cursor, sizeof(*ip)); + struct ip_t *ip; ip: { + ip = cursor_advance(cursor, sizeof(*ip)); switch (ip->nextp) { case 6: goto tcp; case 17: goto udp; -- 2.7.4