mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +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: f588dd8d1766de48c90a5501cf2d537f256d003e 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…
x
Reference in New Issue
Block a user