1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-08 12:44:23 +01:00
Werner Koch ce11cc39ea
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 <wk@gnupg.org>
2015-04-23 15:51:51 +02:00
..
2007-07-04 19:49:40 +00:00
2013-11-18 14:09:47 +01:00
2011-02-04 12:57:53 +01:00
2007-07-04 19:49:40 +00:00
2015-03-17 09:18:23 +01:00
2015-02-26 18:15:10 +01:00
2013-01-30 18:51:56 +01:00
2015-03-23 19:58:25 +01:00
2015-03-23 19:58:25 +01:00
2014-11-11 15:14:31 +01:00
2014-11-11 15:14:31 +01:00
2014-11-11 15:14:31 +01:00
2014-11-11 10:13:10 +01:00
2014-05-02 11:19:25 +02:00
2014-01-29 17:45:05 +01:00
2015-03-25 19:19:38 +01:00
2013-07-31 16:25:41 +02:00
2015-02-03 09:12:45 +01:00
2011-02-04 12:57:53 +01:00
2014-04-17 21:09:10 +02:00

Stuff used by several modules of GnuPG.

These directories use it:

gpg
sm
agent

These directories don't use it:

kbx