mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 03:49:02 +00:00
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.)
This commit is contained in:
parent
9d163c66d0
commit
36b2e7c238
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11433
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user