diff options
author | NIIBE Yutaka <[email protected]> | 2019-08-06 04:14:58 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2019-08-12 01:46:26 +0000 |
commit | 6e6078c8d0d4a2947e2a34f1367e4472f6ae483b (patch) | |
tree | a92a2bf28d5d794502a2bc95017d56b873d24bc0 | |
parent | sm: Support AES-256 key. (diff) | |
download | gnupg-6e6078c8d0d4a2947e2a34f1367e4472f6ae483b.tar.gz gnupg-6e6078c8d0d4a2947e2a34f1367e4472f6ae483b.zip |
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 <[email protected]>
-rw-r--r-- | common/name-value.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/name-value.c b/common/name-value.c index 5094acd03..0129f1bfd 100644 --- a/common/name-value.c +++ b/common/name-value.c @@ -195,11 +195,11 @@ assert_raw_value (nve_t entry) size_t i; /* Find a suitable space to break on. */ - for (i = linelen - 1; linelen - i < 30 && linelen - i > offset; i--) - if (ascii_isspace (entry->value[i])) + for (i = linelen - 1; linelen - i < 30; i--) + if (ascii_isspace (entry->value[offset+i])) break; - if (ascii_isspace (entry->value[i])) + if (ascii_isspace (entry->value[offset+i])) { /* Found one. */ amount = i; |