From: Ted Lemon Date: Tue, 20 Mar 2001 07:26:57 +0000 (+0000) Subject: Add a missing else whose absence was causing memory smashes. X-Git-Tag: V3-BETA-2-PATCH-21~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0b4f89c39a6c160a367008d7dd49db4e374a29a;p=thirdparty%2Fdhcp.git Add a missing else whose absence was causing memory smashes. --- diff --git a/common/print.c b/common/print.c index e6675ecdf..5c8663ecc 100644 --- a/common/print.c +++ b/common/print.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: print.c,v 1.50 2001/03/15 23:17:28 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: print.c,v 1.51 2001/03/20 07:26:57 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -110,7 +110,7 @@ char *quotify_buf (const unsigned char *s, unsigned len, for (i = 0; i < len; i++) { if (s [i] == ' ') *nsp++ = ' '; - if (!isascii (s [i]) || !isprint (s [i])) { + else if (!isascii (s [i]) || !isprint (s [i])) { sprintf (nsp, "\\%3.3o", s [i]); nsp += 4; } else if (s [i] == '"' || s [i] == '\\') {