From 914966e925dc4d328522feb5663003a4316c6035 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 27 Jul 2021 13:31:57 +0200 Subject: [PATCH] readprofile: use snprintf() rather than sprintf() --- sys-utils/readprofile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3