diff options
author | Neal H. Walfield <neal@g10code.com> | 2017-02-02 15:48:45 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@g10code.com> | 2017-02-02 15:48:45 +0100 |
commit | 407f5f9baea5591f148974240a87dfb43e5efef3 (patch) | |
tree | d626dcd8bb5d1ee0f7202f77f6ba1f8eb68e3023 /agent | |
parent | tests: Improve description of test. (diff) | |
download | gnupg2-407f5f9baea5591f148974240a87dfb43e5efef3.tar.xz gnupg2-407f5f9baea5591f148974240a87dfb43e5efef3.zip |
gpg: Don't assume that strtoul interprets "" as 0.
* g10/tofu.c (show_statistics): If there are not records, return 0
instead of NULL.
--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
GnuPG-bug-id: 2853
According to SUSv3:
If the subject sequence is empty or does not have the expected form,
no conversion is performed
...
If no conversion could be performed, 0 is returned and errno may be
set to [EINVAL].
http://pubs.opengroup.org/onlinepubs/007908799/xsh/strtol.html
It appears that MacOS X sets errno to EINVAL, but glibc doesn't.
Hence, we map NULL to 0 explicitly.
Diffstat (limited to 'agent')
0 files changed, 0 insertions, 0 deletions