summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-04-10 08:34:35 +0200
committerWerner Koch <wk@gnupg.org>2015-04-10 08:34:35 +0200
commit9433661419043431a6cfc7d84c8450e0b2f6c353 (patch)
tree80364d5e13fb16aa1cd07aff1bd6bc8101bb0a08 /tools
parentspeedo: Fix libgpg-error build in w64 builds (diff)
downloadgnupg2-9433661419043431a6cfc7d84c8450e0b2f6c353.tar.xz
gnupg2-9433661419043431a6cfc7d84c8450e0b2f6c353.zip
gpgparsemail: Fix last commit (3f2bdac)
* tools/rfc822parse.c (parse_field): Replace break by goto. -- Brown paper bag bug: Changing an IF to a WHILE inside another loop requires to fix the inner break. Reported-by: Hanno Böck Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/rfc822parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/rfc822parse.c b/tools/rfc822parse.c
index e8164ce1a..285e0843c 100644
--- a/tools/rfc822parse.c
+++ b/tools/rfc822parse.c
@@ -829,7 +829,7 @@ parse_field (HDR_LINE hdr)
while (!*s)
{
if (!hdr->next || !hdr->next->cont)
- break;
+ goto oparen_out;
/* Next item is a header continuation line. */
hdr = hdr->next;
s = hdr->line;
@@ -852,6 +852,7 @@ parse_field (HDR_LINE hdr)
else if (*s == '\"')
in_quote = 1;
}
+ oparen_out:
if (!*s)
; /* Actually this is an error, but we don't care about it. */
else