From 6a07bc172b4bdae8bc22f51905194cdd427912cc Mon Sep 17 00:00:00 2001 From: Gon Solo Date: Fri, 23 Jan 2026 11:01:23 +0100 Subject: [PATCH] Fix buf size. While building the nix package I get the following error: gonsolo nixpkgs:nix build .#magic-vlsi error: Cannot build '/nix/store/hg91v7gd3xx7fq9z831xhaq8ylr4k84q-magic-vlsi-8.3.593.drv'. Reason: builder failed with exit code 2. Output paths: /nix/store/fa3xr6gxxghn33246d8987mbvss7zfv7-magic-vlsi-8.3.593 Last 25 log lines: > 213 | sprintf(buf, "%ld:%02ld.%ld %ld:%02ld.%ld", > | ^~~~~ > runstats.c:213:18: note: directive argument in the range [-9223372036854775808, 59] > 213 | sprintf(buf, "%ld:%02ld.%ld %ld:%02ld.%ld", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > runstats.c:213:18: note: directive argument in the range [-92233720368547, 9] > In file included from /nix/store/rwalsamz4246k8f1zzxa54qx7w3fbzdg-glibc-2.42-47-dev/include/stdio.h:970, > from runstats.c:30: > In function 'sprintf', > inlined from 'RunStatsRealTime' at runstats.c:213:5: > /nix/store/rwalsamz4246k8f1zzxa54qx7w3fbzdg-glibc-2.42-47-dev/include/bits/stdio2.h:30:10: note: '__builtin___sprintf_chk' output between 14 and 116 bytes into a destination of size 50 --- utils/runstats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/runstats.c b/utils/runstats.c index f8323ec6..e461f896 100644 --- a/utils/runstats.c +++ b/utils/runstats.c @@ -176,7 +176,7 @@ RunStatsRealTime(void) static int havetime = 0; long totm, tots, tott, incm, incs, inct; struct timezone dummyz; - static char buf[50]; + static char buf[128]; gettimeofday(&curtime, &dummyz); if (!havetime)