mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
common: Fix line break handling, finding a space.
* common/name-value.c (assert_raw_value): Correctly find a space. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
d8a49bbcd1
commit
f588dd8d17
@ -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…
x
Reference in New Issue
Block a user