diff options
author | Werner Koch <wk@gnupg.org> | 2015-11-26 18:04:54 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-11-26 18:05:27 +0100 |
commit | 61941a984964308b09c7fc1b3438fb99d0b3c917 (patch) | |
tree | dd50c8351921c103b3d8df04037f359ea42ef737 /common/stringhelp.h | |
parent | dirmngr: Improve output of "getinfo tor". (diff) | |
download | gnupg2-61941a984964308b09c7fc1b3438fb99d0b3c917.tar.xz gnupg2-61941a984964308b09c7fc1b3438fb99d0b3c917.zip |
common: Fix off-by-one access in the new format_text.
* common/stringhelp.c (format_text): Use existsing fucntion to trim
trailing spaces. Fix off-by-one access.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'common/stringhelp.h')
-rw-r--r-- | common/stringhelp.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/common/stringhelp.h b/common/stringhelp.h index 9ff062bd9..c813662c7 100644 --- a/common/stringhelp.h +++ b/common/stringhelp.h @@ -148,12 +148,10 @@ char **strsplit (char *string, char delim, char replacement, int *count); /* Tokenize STRING using the set of delimiters in DELIM. */ char **strtokenize (const char *string, const char *delim); -/* Format a string so that it fits within about TARGET_COLS columns. - If IN_PLACE is 0, then TEXT is copied to a new buffer, which is - returned. Otherwise, TEXT is modified in place and returned. - Normally, target_cols will be 72 and max_cols is 80. */ +/* Format a string so that it fits within about TARGET_COLS columns. */ char *format_text (char *text, int in_place, int target_cols, int max_cols); + /*-- mapstrings.c --*/ const char *map_static_macro_string (const char *string); |