Home GnuPG
Diffusion GnuPG 0a00115ee204

common: Do not deref vars in tests after a fail().
0a00115ee204Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

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>

Details

Provenance
wernerAuthored on Jan 6 2016, 8:31 AM
Parents
rGe70f7a54f29d: gpg: Align notes about minimal keysize with actual checks.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG0a00115ee204: common: Do not deref vars in tests after a fail(). (authored by Werner Koch <wk@gnupg.org>).Jan 6 2016, 8:31 AM