common: Do not deref vars in tests after a fail().
authorWerner Koch <wk@gnupg.org>
Wed, 6 Jan 2016 07:31:38 +0000 (08:31 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 6 Jan 2016 07:31:38 +0000 (08:31 +0100)
commit0a00115ee2049ab2357b7a14a51c7da185ffcabd
tree8ba811680a3ea2a736a8385534127c7ba5676c57
parente70f7a54f29d727def2cfe9ea5ab9d461b4ce842
common: Do not deref vars in tests after a fail().

* common/t-convert.c (test_bin2hex): Turn if conditions into if-else
chains to avoid accessing unchecked data.
(test_bin2hexcolon): Ditto.
* common/t-mapstrings.c (test_map_static_macro_string): Ditto.
* common/t-stringhelp.c (test_percent_escape): Ditto.
(test_make_filename_try): Ditto.
(test_make_absfilename_try): Ditto.
* common/t-timestuff.c (test_timegm): Ditto.
--

Note that these dereference only occur after failed regression tests.

Signed-off-by: Werner Koch <wk@gnupg.org>
common/t-convert.c
common/t-mapstrings.c
common/t-stringhelp.c
common/t-timestuff.c