diff options
author | wpaul <wpaul@FreeBSD.org> | 1995-10-11 14:30:51 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1995-10-11 14:30:51 +0000 |
commit | c11fb4caff56f3e83d310df3a51223d50cefca20 (patch) | |
tree | 21c5af75c8d99f96f5987bb0f65046331931062c /gnu | |
parent | c061c53f75d05a5ab538da41471c93bcc9586d88 (diff) | |
download | FreeBSD-src-c11fb4caff56f3e83d310df3a51223d50cefca20.zip FreeBSD-src-c11fb4caff56f3e83d310df3a51223d50cefca20.tar.gz |
A one-liner:
We already check for (and reject entries with) '+' or '-' as the first
character of the key side of the key/data pair; we should check the data
side too. (Letting spurious +/- entries into the NIS maps is bad karma.)
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.sbin/yp_mkdb/yp_mkdb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/usr.sbin/yp_mkdb/yp_mkdb.c b/gnu/usr.sbin/yp_mkdb/yp_mkdb.c index bf648a0..932f323 100644 --- a/gnu/usr.sbin/yp_mkdb/yp_mkdb.c +++ b/gnu/usr.sbin/yp_mkdb/yp_mkdb.c @@ -20,7 +20,7 @@ */ /* - * $Id: yp_mkdb.c,v 1.2 1995/03/31 19:45:13 wpaul Exp $ + * $Id: yp_mkdb.c,v 1.3 1995/05/30 05:05:26 rgrimes Exp $ */ #define BUFFERSIZE 4096 @@ -169,6 +169,8 @@ load( char *FileName, char *DbName) for (; Buffer[r]; r++) if (Buffer[r]!=' ' && Buffer[r]!='\t') break; + if (Buffer[r] == '+' || Buffer[r] == '-') break; + key.data=Buffer; key.size=strlen(Buffer); data.data=Buffer+r; data.size=strlen(Buffer+r); (dp->put)(dp,&key,&data,0); |