diff options
author | Werner Koch <[email protected]> | 2005-05-24 09:14:31 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2005-05-24 09:14:31 +0000 |
commit | d8bd3a3826683cd356d517220ff40645ebbf9491 (patch) | |
tree | 9c9289ebe6615445fa7c87002d5d12b1e4dc663a | |
parent | * app-openpgp.c, app-common.h: Again updated from gnupg 1.9 CVS. (diff) | |
download | gnupg-d8bd3a3826683cd356d517220ff40645ebbf9491.tar.gz gnupg-d8bd3a3826683cd356d517220ff40645ebbf9491.zip |
(add_notation_data): Check number of at-signs.
-rw-r--r-- | g10/ChangeLog | 4 | ||||
-rw-r--r-- | g10/g10.c | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index dde6ceb58..86bdce93e 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,7 @@ +2005-05-24 Werner Koch <[email protected]> + + * g10.c (add_notation_data): Check number of at-signs. + 2005-05-23 Werner Koch <[email protected]> * app-openpgp.c, app-common.h: Again updated from gnupg 1.9 CVS. @@ -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) */ |