]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix a crash when server sends more than one of the same option.
authorRoy Marples <roy@marples.name>
Thu, 25 Feb 2010 09:22:30 +0000 (09:22 +0000)
committerRoy Marples <roy@marples.name>
Thu, 25 Feb 2010 09:22:30 +0000 (09:22 +0000)
Thanks to Xia Weizhong.

dhcp.c

diff --git a/dhcp.c b/dhcp.c
index c036c00f40472e67ae919c7862dd21d1f66534a3..df9f1f434801ea2b9d544dfc70277b639f467cc3 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -362,7 +362,7 @@ exit:
                *len = bl;
        if (bp) {
                memcpy(bp, op, ol);
-               return (const uint8_t *)&opt_buffer;
+               return (const uint8_t *)opt_buffer;
        }
        if (op)
                return op;