aboutsummaryrefslogtreecommitdiffstats
path: root/common/stringhelp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-04-23 12:31:04 +0000
committerWerner Koch <[email protected]>2015-04-23 13:51:51 +0000
commitce11cc39ea7e011040debc9339a2310a714efe7e (patch)
treef53bc9939b00a857e70270b9cd4ac55303ba2933 /common/stringhelp.c
parentcommon: removal of t-support.c from t_jnlib_src. (diff)
downloadgnupg-ce11cc39ea7e011040debc9339a2310a714efe7e.tar.gz
gnupg-ce11cc39ea7e011040debc9339a2310a714efe7e.zip
common: Minor change of hex2str to allow for embedded nul.
* common/convert.c (hex2str): Set ERRNO. Return adjusted COUNT. -- hex2str is only used at one place for in-place converting an hex encoded passphrase. This change does not affect this use. The change is however useful to use the function for in-place conversion of arbitrary hex encoded strings. Take care for in-place conversion of a hex string encoding binary data you need to use it this way: if (hex2str (string, string, strlen (string) + 1, &length) oops ("probably out of memory but see ERRNO"); for (i=0; i < length; i++) foo (string[i)); Note that strlen() + 1. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/stringhelp.c')
0 files changed, 0 insertions, 0 deletions