From: Karel Zak Date: Tue, 27 Jul 2021 11:31:57 +0000 (+0200) Subject: readprofile: use snprintf() rather than sprintf() X-Git-Tag: v2.38-rc1~342 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=914966e925dc4d328522feb5663003a4316c6035;p=thirdparty%2Futil-linux.git readprofile: use snprintf() rather than sprintf() --- diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c index 00d9970aa8..579902d50a 100644 --- a/sys-utils/readprofile.c +++ b/sys-utils/readprofile.c @@ -70,7 +70,7 @@ static FILE *myopen(char *name, char *mode, int *flag) if (!strcmp(name + len - 3, ".gz")) { FILE *res; char *cmdline = xmalloc(len + 6); - sprintf(cmdline, "zcat %s", name); + snprintf(cmdline, len + 6, "zcat %s", name); res = popen(cmdline, mode); free(cmdline); *flag = 1;