]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Make print_hw_addr bulletproof.
authorTed Lemon <source@isc.org>
Fri, 4 May 2001 01:05:17 +0000 (01:05 +0000)
committerTed Lemon <source@isc.org>
Fri, 4 May 2001 01:05:17 +0000 (01:05 +0000)
common/print.c

index 74b96d34ad0f1655212cb8a4be6b7989938010af..20f6a24e1ca4382c0cbb2e379185826f7721df9f 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: print.c,v 1.52 2001/04/09 00:36:45 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: print.c,v 1.53 2001/05/04 01:05:17 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -133,7 +133,7 @@ char *print_hw_addr (htype, hlen, data)
        char *s;
        int i;
 
-       if (hlen == 0)
+       if (hlen <= 0)
                habuf [0] = 0;
        else {
                s = habuf;