mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-02 22:38:02 +02:00
common: Fix line break handling, finding a space.
* common/name-value.c (assert_raw_value): Correctly find a space.
--
Cherry-pick master commit of:
f588dd8d17
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
a9816d5fb1
commit
6e6078c8d0
|
@ -195,11 +195,11 @@ assert_raw_value (nve_t entry)
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
/* Find a suitable space to break on. */
|
/* Find a suitable space to break on. */
|
||||||
for (i = linelen - 1; linelen - i < 30 && linelen - i > offset; i--)
|
for (i = linelen - 1; linelen - i < 30; i--)
|
||||||
if (ascii_isspace (entry->value[i]))
|
if (ascii_isspace (entry->value[offset+i]))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (ascii_isspace (entry->value[i]))
|
if (ascii_isspace (entry->value[offset+i]))
|
||||||
{
|
{
|
||||||
/* Found one. */
|
/* Found one. */
|
||||||
amount = i;
|
amount = i;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user