Fix lurking bug exposed by r18687
authorGé van Geldorp <ge@gse.nl>
Wed, 26 Oct 2005 23:19:37 +0000 (23:19 +0000)
committerGé van Geldorp <ge@gse.nl>
Wed, 26 Oct 2005 23:19:37 +0000 (23:19 +0000)
svn path=/trunk/; revision=18781

reactos/services/dhcp/options.c

index 135d608..46bc453 100644 (file)
@@ -595,6 +595,7 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
                                foo.s_addr = htonl(getULong(dp));
                                strncpy(op, inet_ntoa(foo), opleft - 1);
                                op[opleft - 1] = ANSI_NULL;
+                               opcount = strlen(op);
                                if (opcount >= opleft)
                                        goto toobig;
                                opleft -= opcount;