[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.21-5-g9158f58
by NIIBE Yutaka
cvs at cvs.gnupg.org
Tue Aug 27 05:03:31 CEST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-2-0 has been updated
via 9158f58822a9258390b857aee5bf9751328793bb (commit)
from 6d8f36a0458a50685e130c55018e0d941101d952 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9158f58822a9258390b857aee5bf9751328793bb
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Tue Aug 27 10:23:09 2013 +0900
scd: fix parsing login-data DO.
* scd/app-openpgp.c (parse_login_data): Release RELPTR. Fix parsing.
--
Signed-off-by: NIIBE Yutaka
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 4af4e93..9186e18 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -629,7 +629,11 @@ parse_login_data (app_t app)
if (*buffer == '\n')
break;
if (buflen < 2 || buffer[1] != '\x14')
- return; /* No control sequences. */
+ {
+ xfree (relptr);
+ return; /* No control sequences. */
+ }
+
buflen--;
buffer++;
do
@@ -676,14 +680,11 @@ parse_login_data (app_t app)
m = strtol (q, &q, 10);
}
- buffer = q;
if (buflen < ((unsigned char *)q - buffer))
- {
- buflen = 0;
- break;
- }
- else
- buflen -= ((unsigned char *)q - buffer);
+ break;
+
+ buflen -= ((unsigned char *)q - buffer);
+ buffer = q;
if (buflen && !(*buffer == '\n' || *buffer == '\x18'))
goto next;
@@ -694,11 +695,11 @@ parse_login_data (app_t app)
}
}
next:
- for (; buflen && *buffer != '\x18'; buflen--, buffer++)
- if (*buffer == '\n')
- buflen = 1;
+ /* Skip to FS (0x18) or LF (\n). */
+ for (; buflen && *buffer != '\x18' && *buffer != '\n'; buflen--)
+ buffer++;
}
- while (buflen);
+ while (buflen && *buffer != '\n');
xfree (relptr);
}
-----------------------------------------------------------------------
Summary of changes:
scd/app-openpgp.c | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list