gnupg/g10 (ChangeLog g10.c)

cvs user wk cvs at cvs.gnupg.org
Tue May 24 10:54:18 CEST 2005


    Date: Tuesday, May 24, 2005 @ 11:14:31
  Author: wk
    Path: /cvs/gnupg/gnupg/g10

Modified: ChangeLog g10.c

(add_notation_data): Check number of at-signs.


-----------+
 ChangeLog |    4 ++++
 g10.c     |    8 +++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)


Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.740 gnupg/g10/ChangeLog:1.741
--- gnupg/g10/ChangeLog:1.740	Mon May 23 22:16:21 2005
+++ gnupg/g10/ChangeLog	Tue May 24 11:14:31 2005
@@ -1,3 +1,7 @@
+2005-05-24  Werner Koch  <wk at g10code.com>
+
+	* g10.c (add_notation_data): Check number of at-signs.
+
 2005-05-23  Werner Koch  <wk at g10code.com>
 
 	* app-openpgp.c, app-common.h: Again updated from gnupg 1.9 CVS.
Index: gnupg/g10/g10.c
diff -u gnupg/g10/g10.c:1.305 gnupg/g10/g10.c:1.306
--- gnupg/g10/g10.c:1.305	Mon May 23 16:38:05 2005
+++ gnupg/g10/g10.c	Tue May 24 11:14:31 2005
@@ -3879,7 +3879,7 @@
     for( s=string ; *s != '='; s++ )
       {
 	if( *s=='@')
-	  saw_at=1;
+	  saw_at++;
 
 	if( !*s || !isascii (*s) || (!isgraph(*s) && !isspace(*s)) )
 	  {
@@ -3894,6 +3894,12 @@
 	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) */




More information about the Gnupg-commits mailing list