From: Ted Lemon Date: Fri, 4 May 2001 01:05:17 +0000 (+0000) Subject: Make print_hw_addr bulletproof. X-Git-Tag: V3-RC5~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33d1e366dbd66ea5d0753d0d29020a226236370d;p=thirdparty%2Fdhcp.git Make print_hw_addr bulletproof. --- diff --git a/common/print.c b/common/print.c index 74b96d34a..20f6a24e1 100644 --- a/common/print.c +++ b/common/print.c @@ -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;