]> git.ipfire.org Git - thirdparty/util-linux.git/commit - misc-utils/getopt.c
getopt: fix memory leaks and integer overflows [ASAN & valgrind]
authorSami Kerola <kerolasa@iki.fi>
Mon, 14 Mar 2016 21:06:30 +0000 (21:06 +0000)
committerSami Kerola <kerolasa@iki.fi>
Wed, 20 Apr 2016 21:04:34 +0000 (22:04 +0100)
commitb13fedd485cb2e9663c1c69a5cb8c512f9ad4771
tree765dce8179b88c0677a9866747ac861ecab2e40f
parent34f6177a24cf602d0720b82f2064e6830ba34ffb
getopt: fix memory leaks and integer overflows [ASAN & valgrind]

The getopt(1) is short living command, and one could argue ensuring all
allocations are freed at end of execution is waste of time.  There is a
point in that, but making test-suite runs to be less noisy with ASAN is also
nice as it encourages reading the errors when/if they happen.

Reviewed-by: Yuriy M. Kaminskiy <yumkam@gmail.com>
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/getopt.c