pm

barely a pack manager
git clone git://z3bra.org/pm
Log | Files | Refs | README | LICENSE

commit 76ec1848a58718b2fba8162c8f3e8695bfe12644
parent bbfee43d53ebc2ace9c41c80b6dc30ac3e91b5c6
Author: z3bra <contactatz3bradotorg>
Date:   Mon,  1 Apr 2019 09:35:04 +0200

Replace sprintf() with snprintf() call

Diffstat:
pm.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pm.c b/pm.c @@ -509,7 +509,7 @@ inspect_version(const char *datadir, const char *name, char version[LINE_MAX]) snprintf(tmp, PATH_MAX, "%s/%s/version", datadir, name); if ((stream = fopen(tmp, "r")) == NULL) { - sprintf(version, "(unknown)"); + snprintf(version, 10, "(unknown)"); return 1; } else { fgets(version, LINE_MAX, stream);