aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2006-07-17 04:11:30 +0000
committerDavid Shaw <[email protected]>2006-07-17 04:11:30 +0000
commitb8b482b59628a1d1b35ae220073f5a6cd609ef74 (patch)
tree6b52007d293198263b868894c13ae97d085f5e64
parent* gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key, send_key_keyserver): (diff)
downloadgnupg-b8b482b59628a1d1b35ae220073f5a6cd609ef74.tar.gz
gnupg-b8b482b59628a1d1b35ae220073f5a6cd609ef74.zip
* gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key,
send_key_keyserver): Improved version of previous fix. Force match on spaces in string.
Diffstat (limited to '')
-rw-r--r--keyserver/ChangeLog6
-rw-r--r--keyserver/gpgkeys_hkp.c4
-rw-r--r--keyserver/gpgkeys_ldap.c12
3 files changed, 14 insertions, 8 deletions
diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog
index 1389924f4..4d6813778 100644
--- a/keyserver/ChangeLog
+++ b/keyserver/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-16 David Shaw <[email protected]>
+
+ * gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key,
+ send_key_keyserver): Improved version of previous fix. Force
+ match on spaces in string.
+
2006-07-14 David Shaw <[email protected]>
* gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key,
diff --git a/keyserver/gpgkeys_hkp.c b/keyserver/gpgkeys_hkp.c
index 52a01c028..e6de3634c 100644
--- a/keyserver/gpgkeys_hkp.c
+++ b/keyserver/gpgkeys_hkp.c
@@ -94,7 +94,7 @@ send_key(int *eof)
/* Read and throw away input until we see the BEGIN */
while(fgets(line,MAX_LINE,input)!=NULL)
- if(sscanf(line,"KEY %16s %5s\n",keyid,state)==2
+ if(sscanf(line,"KEY%*[ ]%16s%*[ ]%5s\n",keyid,state)==2
&& strcmp(state,"BEGIN")==0)
{
begin=1;
@@ -113,7 +113,7 @@ send_key(int *eof)
/* Now slurp up everything until we see the END */
while(fgets(line,MAX_LINE,input))
- if(sscanf(line,"KEY %16s %3s\n",keyid,state)==2
+ if(sscanf(line,"KEY%*[ ]%16s%*[ ]%3s\n",keyid,state)==2
&& strcmp(state,"END")==0)
{
end=1;
diff --git a/keyserver/gpgkeys_ldap.c b/keyserver/gpgkeys_ldap.c
index 6e5345e5d..357c874ea 100644
--- a/keyserver/gpgkeys_ldap.c
+++ b/keyserver/gpgkeys_ldap.c
@@ -608,7 +608,7 @@ send_key(int *eof)
/* Assemble the INFO stuff into LDAP attributes */
while(fgets(line,MAX_LINE,input)!=NULL)
- if(sscanf(line,"INFO %16s %5s\n",keyid,state)==2
+ if(sscanf(line,"INFO%*[ ]%16s%*[ ]%5s\n",keyid,state)==2
&& strcmp(state,"BEGIN")==0)
{
begin=1;
@@ -654,7 +654,7 @@ send_key(int *eof)
/* Now parse each line until we see the END */
while(fgets(line,MAX_LINE,input)!=NULL)
- if(sscanf(line,"INFO %16s %3s\n",keyid,state)==2
+ if(sscanf(line,"INFO%*[ ]%16s%*[ ]%3s\n",keyid,state)==2
&& strcmp(state,"END")==0)
{
end=1;
@@ -676,7 +676,7 @@ send_key(int *eof)
/* Read and throw away stdin until we see the BEGIN */
while(fgets(line,MAX_LINE,input)!=NULL)
- if(sscanf(line,"KEY %16s %5s\n",keyid,state)==2
+ if(sscanf(line,"KEY%*[ ]%16s%*[ ]%5s\n",keyid,state)==2
&& strcmp(state,"BEGIN")==0)
{
begin=1;
@@ -695,7 +695,7 @@ send_key(int *eof)
/* Now slurp up everything until we see the END */
while(fgets(line,MAX_LINE,input)!=NULL)
- if(sscanf(line,"KEY %16s %3s\n",keyid,state)==2
+ if(sscanf(line,"KEY%*[ ]%16s%*[ ]%3s\n",keyid,state)==2
&& strcmp(state,"END")==0)
{
end=1;
@@ -816,7 +816,7 @@ send_key_keyserver(int *eof)
/* Read and throw away stdin until we see the BEGIN */
while(fgets(line,MAX_LINE,input)!=NULL)
- if(sscanf(line,"KEY %16s %5s\n",keyid,state)==2
+ if(sscanf(line,"KEY%*[ ]%16s%*[ ]%5s\n",keyid,state)==2
&& strcmp(state,"BEGIN")==0)
{
begin=1;
@@ -835,7 +835,7 @@ send_key_keyserver(int *eof)
/* Now slurp up everything until we see the END */
while(fgets(line,MAX_LINE,input)!=NULL)
- if(sscanf(line,"KEY %16s %3s\n",keyid,state)==2
+ if(sscanf(line,"KEY%*[ ]%16s%*[ ]%3s\n",keyid,state)==2
&& strcmp(state,"END")==0)
{
end=1;