]> git.ipfire.org Git - thirdparty/util-linux.git/commit
ul: use size_t to measure memory allocation size
authorSami Kerola <kerolasa@iki.fi>
Fri, 16 Oct 2020 21:26:15 +0000 (22:26 +0100)
committerSami Kerola <kerolasa@iki.fi>
Tue, 20 Oct 2020 20:13:24 +0000 (21:13 +0100)
commit0186ff364d55bc3e5a5a9aaeae6c71bf5cf2f9fd
tree0b3d28f96b5017e2deef35e3fe6a0539381c4e14
parent9a59ee652593e7a0c7aeba75ef637e0023ac0542
ul: use size_t to measure memory allocation size

The size_t is the type libc memory allocation functions use.  The size_t
also provides allocation range that is enough not to a simple tool like this
to perform paranoia size checks.  Just let the realloc(3) fail if there is
not enough memory available to handle the requested line size.  That is a
lot more straightforward.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
text-utils/ul.c