Skip to content

Commit 69a35ca

Browse files
committed
lq: make sure last_ip != NULL
Coverity: CID 739653 (#1 of 1): Explicit null dereferenced (FORWARD_NULL) At (11): Passing null pointer "last_ip" to function "calculate_border_flag(void *, void *)", which dereferences it. Signed-off-by: Ferry Huberts <[email protected]>
1 parent 75afafa commit 69a35ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lq_packet.c

+1
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ serialize_lq_tc(struct lq_tc_message *lq_tc, struct interface *outif)
574574
// force signed comparison
575575
if ((int)(size + olsr_cnf->ipsize + olsr_sizeof_tc_lqdata()) > rem) {
576576
head->lower_border = left_border_flag;
577+
assert(last_ip);
577578
head->upper_border = calculate_border_flag(last_ip, &neigh->address);
578579
left_border_flag = head->upper_border;
579580

0 commit comments

Comments
 (0)