]> git.ipfire.org Git - thirdparty/util-linux.git/commit
treewide: use reallocarray to allocated memory that will be reallocated
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 27 Sep 2023 19:03:08 +0000 (21:03 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Thu, 28 Sep 2023 06:10:59 +0000 (08:10 +0200)
commit343b2e4bf9ceccfc34edc914e06dcde6d0d01919
treeef4d8fefa2d256e0db993a1c7c89a7e6d341b1b7
parentd3278188954e1b710ede9541395e0abf3f6b2a14
treewide: use reallocarray to allocated memory that will be reallocated

GCC 13 -fanalyzer expects memory that is passed to reallocarray() to
have been allocated with reallocarray() in the first place and not with
malloc().

While this requirement seems to contradict the documentation, the usage
of reallocarray() is better than the current plain malloc() in any case.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
login-utils/lslogins.c
misc-utils/logger.c
text-utils/more.c
text-utils/rev.c