logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: a68504597b31351c35baf9808ae3e00a9840c49c
parent debf485d1890d84e830a415a1063aadab281065a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 30 Nov 2025 12:41:57 +0100

libutils/consent.c: use sizeof() for regerror buffer

Diffstat:

Mlibutils/consent.c4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libutils/consent.c b/libutils/consent.c @@ -27,7 +27,7 @@ consent_init(void) if(yesexpr_ret != 0) { char errstr[64] = ""; - regerror(yesexpr_ret, &consent_yesexpr_r, errstr, 100); + regerror(yesexpr_ret, &consent_yesexpr_r, errstr, sizeof(errstr)); fprintf(stderr, "%s: warning: Got erroneous yesexpr regex /%s/ from locale: %s\n", argv0, @@ -45,7 +45,7 @@ consent_init(void) if(noexpr_ret != 0) { char errstr[64] = ""; - regerror(noexpr_ret, &consent_noexpr_r, errstr, 100); + regerror(noexpr_ret, &consent_noexpr_r, errstr, sizeof(errstr)); fprintf(stderr, "%s: warning: Got erroneous noexpr regex /%s/ from locale: %s\n", argv0,