summaryrefslogtreecommitdiffstats
path: root/usr.sbin/netgroup_mkdb
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-04-15 15:06:13 +0000
committerderaadt <deraadt@openbsd.org>1997-04-15 15:06:13 +0000
commite89e0eeda8b9e9701b2c33ad2a5bcd7c993f462a (patch)
tree3a5ab772c63d22f5e4a252fb64eec97a5fb596bd /usr.sbin/netgroup_mkdb
parentneed an rd (diff)
downloadwireguard-openbsd-e89e0eeda8b9e9701b2c33ad2a5bcd7c993f462a.tar.xz
wireguard-openbsd-e89e0eeda8b9e9701b2c33ad2a5bcd7c993f462a.zip
handle \\ at start of line; christos
Diffstat (limited to 'usr.sbin/netgroup_mkdb')
-rw-r--r--usr.sbin/netgroup_mkdb/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/netgroup_mkdb/util.c b/usr.sbin/netgroup_mkdb/util.c
index 66909a3f2f8..b418409caf2 100644
--- a/usr.sbin/netgroup_mkdb/util.c
+++ b/usr.sbin/netgroup_mkdb/util.c
@@ -30,7 +30,7 @@
*/
#ifndef lint
-static char *rcsid = "$Id: util.c,v 1.1.1.1 1995/10/18 08:47:57 deraadt Exp $";
+static char *rcsid = "$Id: util.c,v 1.2 1997/04/15 15:06:13 deraadt Exp $";
#endif
#include <err.h>
@@ -91,7 +91,7 @@ getline(fp, size)
}
if (ptr[s - 1] == '\n') /* the newline may be missing at EOF */
s--; /* forget newline */
- if ((cnt = (ptr[s - 1] == '\\'))) /* check for \\ */
+ if (s && (cnt = (ptr[s - 1] == '\\'))) /* check for \\ */
s--; /* forget \\ */
buf = erealloc(buf, len + s + 1);