From: Daniel Wagner <[email protected]>

rem is garanteed to be at least 0.

Reported by coverity.
---
 gdhcp/common.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gdhcp/common.c b/gdhcp/common.c
index 88fa2c2..ed40f91 100644
--- a/gdhcp/common.c
+++ b/gdhcp/common.c
@@ -172,10 +172,7 @@ uint8_t *dhcpv6_get_option(struct dhcpv6_packet *packet, 
uint16_t pkt_len,
                if (opt_code == code) {
                        if (option_len)
                                *option_len = opt_len;
-                       if (rem < 0)
-                               goto bad_packet;
-                       else
-                               found = optionptr + 2 + 2;
+                       found = optionptr + 2 + 2;
                        count++;
                }
 
-- 
1.8.4.474.g128a96c

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to