mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-08 23:37:47 +02:00
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>
(backported from 2.1 commit 9433661419
)
This commit is contained in:
parent
de7f7b98df
commit
93910b5b8d
|
@ -829,7 +829,7 @@ parse_field (HDR_LINE hdr)
|
||||||
while (!*s)
|
while (!*s)
|
||||||
{
|
{
|
||||||
if (!hdr->next || !hdr->next->cont)
|
if (!hdr->next || !hdr->next->cont)
|
||||||
break;
|
goto oparen_out;
|
||||||
/* Next item is a header continuation line. */
|
/* Next item is a header continuation line. */
|
||||||
hdr = hdr->next;
|
hdr = hdr->next;
|
||||||
s = hdr->line;
|
s = hdr->line;
|
||||||
|
@ -852,6 +852,7 @@ parse_field (HDR_LINE hdr)
|
||||||
else if (*s == '\"')
|
else if (*s == '\"')
|
||||||
in_quote = 1;
|
in_quote = 1;
|
||||||
}
|
}
|
||||||
|
oparen_out:
|
||||||
if (!*s)
|
if (!*s)
|
||||||
; /* Actually this is an error, but we don't care about it. */
|
; /* Actually this is an error, but we don't care about it. */
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user