From 9828ab115efc77a72ff78206f2e38d5ca8505e56 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 21 May 2017 22:41:16 +0100 Subject: [PATCH] Fix compiler warning. --- src/rfc2131.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rfc2131.c b/src/rfc2131.c index da69fef..a679470 100644 --- a/src/rfc2131.c +++ b/src/rfc2131.c @@ -383,7 +383,7 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index, { len = option_uint(opt, offset + 4 , 1); /* Need to take care that bad data can't run us off the end of the packet */ - if ((offset + len + 5 <= (option_len(opt))) && + if ((offset + len + 5 <= (unsigned)(option_len(opt))) && (option_uint(opt, offset, 4) == (unsigned int)o->u.encap)) for (o2 = offset + 5; o2 < offset + len + 5; o2 += elen + 1) {