1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

(add_notation_data): Check number of at-signs.

This commit is contained in:
Werner Koch 2005-05-24 09:14:31 +00:00
parent 2f63b5299c
commit d8bd3a3826
2 changed files with 11 additions and 1 deletions

View file

@ -3879,7 +3879,7 @@ add_notation_data( const char *string, int which )
for( s=string ; *s != '='; s++ )
{
if( *s=='@')
saw_at=1;
saw_at++;
if( !*s || !isascii (*s) || (!isgraph(*s) && !isspace(*s)) )
{
@ -3894,6 +3894,12 @@ add_notation_data( const char *string, int which )
log_error(_("a user notation name must contain the '@' character\n"));
return;
}
if (saw_at > 1)
{
log_error(_("a notation name must contain more than "
"one '@' character\n"));
return;
}
/* we only support printable text - therefore we enforce the use
* of only printable characters (an empty value is valid) */