Bug#1106544: unblock: atop/2.11.1-3 or atop/2.11.2-1 (pre-approval)
On Wed, May 28, 2025 at 07:15:46PM +0200, Marc Haber wrote:
Debdiff attached.
Of course not. Now.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
diff -Nru atop-2.11.1/debian/changelog atop-2.11.1/debian/changelog
--- atop-2.11.1/debian/changelog 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/changelog 2025-05-28 18:07:22.000000000 +0200
@@ -1,3 +1,12 @@
+atop (2.11.1-3) unstable; urgency=medium
+
+ * replace sprintf with snprintf.
+ * new parameter for format_bandw to get rid of sprintf.
+ * fix buffer overflow crash on Raspberry Pi 5 (fake NUMA architecture)
+ Thanks to Gerlof Langeveld (Closes: #1106234)
+
+ -- Marc Haber <mh+debian-packages@zugschlus.de> Wed, 28 May 2025 18:07:22 +0200
+
atop (2.11.1-2) unstable; urgency=medium
* rewrite postinst to address #1102488
diff -Nru atop-2.11.1/debian/patches/0016-replace-sprintf-with-snprintf.patch atop-2.11.1/debian/patches/0016-replace-sprintf-with-snprintf.patch
--- atop-2.11.1/debian/patches/0016-replace-sprintf-with-snprintf.patch 1970-01-01 01:00:00.000000000 +0100
+++ atop-2.11.1/debian/patches/0016-replace-sprintf-with-snprintf.patch 2025-05-28 18:07:22.000000000 +0200
@@ -0,0 +1,1083 @@
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:59:39 +0200
+Subject: replace sprintf with snprintf
+
+Author: Gerlof Langeveld
+Forwarded: not-needed
+---
+ atop.c | 2 +-
+ atopcat.c | 2 +-
+ netlink.c | 2 +-
+ photosyst.c | 15 +++++--
+ showlinux.c | 2 +-
+ showprocs.c | 108 +++++++++++++++++++++++------------------------
+ showsys.c | 138 ++++++++++++++++++++++++++++++------------------------------
+ 7 files changed, 138 insertions(+), 131 deletions(-)
+
+diff --git a/atop.c b/atop.c
+index ea3865e..0040c61 100644
+--- a/atop.c
++++ b/atop.c
+@@ -1266,7 +1266,7 @@ twinprepare(void)
+
+ ptrverify(tempname, "Malloc failed for temporary twin name\n");
+
+- sprintf(tempname, "%s/%s", twindir, TWINNAME);
++ snprintf(tempname, strlen(twindir) + sizeof TWINNAME + 1, "%s/%s", twindir, TWINNAME);
+
+ if ( (tempfd = mkstemp(tempname)) == -1)
+ {
+diff --git a/atopcat.c b/atopcat.c
+index fb014a0..2864011 100644
+--- a/atopcat.c
++++ b/atopcat.c
+@@ -365,7 +365,7 @@ convepoch(time_t utime)
+
+ tt = localtime(&utime);
+
+- sprintf(datetime, "%04d/%02d/%02d %02d:%02d:%02d",
++ snprintf(datetime, sizeof datetime, "%04d/%02d/%02d %02d:%02d:%02d",
+ tt->tm_year+1900, tt->tm_mon+1, tt->tm_mday,
+ tt->tm_hour, tt->tm_min, tt->tm_sec);
+
+diff --git a/netlink.c b/netlink.c
+index eb3a7ca..7991267 100644
+--- a/netlink.c
++++ b/netlink.c
+@@ -78,7 +78,7 @@ netlink_open(void)
+ ** determine maximum number of CPU's for this system
+ ** and specify mask to register all cpu's
+ */
+- sprintf(cpudef, "0-%d", getnumcpu() -1);
++ snprintf(cpudef, sizeof cpudef, "0-%d", getnumcpu() -1);
+
+ /*
+ ** indicate to listen for processes from all CPU's
+diff --git a/photosyst.c b/photosyst.c
+index 860e41d..2f862fd 100644
+--- a/photosyst.c
++++ b/photosyst.c
+@@ -913,8 +913,11 @@ photosyst(struct sstat *si)
+ ptrverify(lhugepagetot,
+ "Malloc failed for huge page total");
+
+- sprintf(lhugepagetot, "%s/%s/nr_hugepages",
+- HUGEPAGEDIR, dentry->d_name);
++ snprintf(lhugepagetot,
++ sizeof HUGEPAGEDIR + 1 +
++ strlen(dentry->d_name) + 1 +
++ sizeof "nr_hugepages" + 1,
++ "%s/%s/nr_hugepages", HUGEPAGEDIR, dentry->d_name);
+
+
+ lhugepagefree = malloc(sizeof HUGEPAGEDIR + 1 +
+@@ -924,8 +927,10 @@ photosyst(struct sstat *si)
+ ptrverify(lhugepagefree,
+ "Malloc failed for huge page free");
+
+- sprintf(lhugepagefree, "%s/%s/free_hugepages",
+- HUGEPAGEDIR, dentry->d_name);
++ snprintf(lhugepagefree, sizeof HUGEPAGEDIR + 1 +
++ strlen(dentry->d_name) + 1 +
++ sizeof "free_hugepages" + 1,
++ "%s/%s/free_hugepages", HUGEPAGEDIR, dentry->d_name);
+
+ break;
+ }
+@@ -1065,9 +1070,11 @@ photosyst(struct sstat *si)
+ else if ( strcmp("HugePages_Free:", nam) == EQ)
+ si->memnuma.numa[j].freehp = cnts[1];
+ }
++
+ fclose(fp);
+ }
+ }
++
+ closedir(dirp);
+ }
+
+diff --git a/showlinux.c b/showlinux.c
+index 5226eb7..3bdf804 100644
+--- a/showlinux.c
++++ b/showlinux.c
+@@ -704,7 +704,7 @@ init_proc_prints(count_t numcpu)
+
+ ptrverify(p, "Malloc failed for formatted header\n");
+
+- sprintf(p, "%*s", pidwidth, idprocpdefs[i]->head);
++ snprintf(p, pidwidth+1, "%*s", pidwidth, idprocpdefs[i]->head);
+ idprocpdefs[i]->head = p;
+ }
+ }
+diff --git a/showprocs.c b/showprocs.c
+index 7d56732..b8e5db9 100644
+--- a/showprocs.c
++++ b/showprocs.c
+@@ -418,12 +418,12 @@ showprochead(detail_printpair* elemptr, int curlist, int totlist,
+
+ if (screen)
+ {
+- col += sprintf(buf+col, "%*s%s%*s",
++ col += snprintf(buf+col, bufsz-col, "%*s%s%*s",
+ widen, autoindic, chead, colspacings[n], "");
+ }
+ else
+ {
+- col += sprintf(buf+col, "%s%s ", autoindic, chead);
++ col += snprintf(buf+col, bufsz-col, "%s%s ", autoindic, chead);
+ }
+
+ elemptr++;
+@@ -432,16 +432,16 @@ showprochead(detail_printpair* elemptr, int curlist, int totlist,
+
+ if (screen) // add page number, eat from last header if needed...
+ {
+- pagindiclen=sprintf(pagindic,"%d/%d", curlist, totlist);
++ pagindiclen=snprintf(pagindic, sizeof pagindic, "%d/%d", curlist, totlist);
+ align=COLS-col-pagindiclen; // extra spaces needed
+
+ if (align >= 0) // align by adding spaces
+ {
+- sprintf(buf+col, "%*s", align+pagindiclen, pagindic);
++ snprintf(buf+col, bufsz-col, "%*s", align+pagindiclen, pagindic);
+ }
+ else if (col+align >= 0)
+ { // align by removing from the right
+- sprintf(buf+col+align, "%s", pagindic);
++ snprintf(buf+col+align, bufsz-(col+align), "%s", pagindic);
+ }
+ }
+
+@@ -572,9 +572,9 @@ procprt_TID_ae(struct tstat *curstat, int avgval, int nsecs)
+ static char buf[64];
+
+ if (curstat->gen.isproc)
+- sprintf(buf, "%*s", procprt_TID.width, "-");
++ snprintf(buf, sizeof buf, "%*s", procprt_TID.width, "-");
+ else
+- sprintf(buf, "%*d", procprt_TID.width, curstat->gen.pid);
++ snprintf(buf, sizeof buf, "%*d", procprt_TID.width, curstat->gen.pid);
+ return buf;
+ }
+
+@@ -586,7 +586,7 @@ procprt_PID_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[64];
+
+- sprintf(buf, "%*d", procprt_PID.width, curstat->gen.tgid);
++ snprintf(buf, sizeof buf, "%*d", procprt_PID.width, curstat->gen.tgid);
+ return buf;
+ }
+
+@@ -596,9 +596,9 @@ procprt_PID_e(struct tstat *curstat, int avgval, int nsecs)
+ static char buf[64];
+
+ if (curstat->gen.pid == 0)
+- sprintf(buf, "%*s", procprt_PID.width, "?");
++ snprintf(buf, sizeof buf, "%*s", procprt_PID.width, "?");
+ else
+- sprintf(buf, "%*d", procprt_PID.width, curstat->gen.tgid);
++ snprintf(buf, sizeof buf, "%*d", procprt_PID.width, curstat->gen.tgid);
+ return buf;
+ }
+
+@@ -610,7 +610,7 @@ procprt_PPID_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[64];
+
+- sprintf(buf, "%*d", procprt_PPID.width, curstat->gen.ppid);
++ snprintf(buf, sizeof buf, "%*d", procprt_PPID.width, curstat->gen.ppid);
+ return buf;
+ }
+
+@@ -620,9 +620,9 @@ procprt_PPID_e(struct tstat *curstat, int avgval, int nsecs)
+ static char buf[64];
+
+ if (curstat->gen.ppid)
+- sprintf(buf, "%*d", procprt_PPID.width, curstat->gen.ppid);
++ snprintf(buf, sizeof buf, "%*d", procprt_PPID.width, curstat->gen.ppid);
+ else
+- sprintf(buf, "%*s", procprt_PPID.width, "-");
++ snprintf(buf, sizeof buf, "%*s", procprt_PPID.width, "-");
+ return buf;
+ }
+
+@@ -634,7 +634,7 @@ procprt_VPID_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[64];
+
+- sprintf(buf, "%*d", procprt_VPID.width, curstat->gen.vpid);
++ snprintf(buf, sizeof buf, "%*d", procprt_VPID.width, curstat->gen.vpid);
+ return buf;
+ }
+
+@@ -643,7 +643,7 @@ procprt_VPID_e(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[64];
+
+- sprintf(buf, "%*s", procprt_VPID.width, "-");
++ snprintf(buf, sizeof buf, "%*s", procprt_VPID.width, "-");
+ return buf;
+ }
+
+@@ -655,7 +655,7 @@ procprt_CTID_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[32];
+
+- sprintf(buf, "%5d", curstat->gen.ctid);
++ snprintf(buf, sizeof buf, "%5d", curstat->gen.ctid);
+ return buf;
+ }
+
+@@ -674,9 +674,9 @@ procprt_CID_a(struct tstat *curstat, int avgval, int nsecs)
+ static char buf[64];
+
+ if (curstat->gen.utsname[0])
+- sprintf(buf, "%-15s", curstat->gen.utsname);
++ snprintf(buf, sizeof buf, "%-15s", curstat->gen.utsname);
+ else
+- sprintf(buf, "%-15s", "host-----------");
++ snprintf(buf, sizeof buf, "%-15s", "host-----------");
+
+ return buf;
+ }
+@@ -687,9 +687,9 @@ procprt_CID_e(struct tstat *curstat, int avgval, int nsecs)
+ static char buf[64];
+
+ if (curstat->gen.utsname[0])
+- sprintf(buf, "%-15s", curstat->gen.utsname);
++ snprintf(buf, sizeof buf, "%-15s", curstat->gen.utsname);
+ else
+- sprintf(buf, "%-15s", "?");
++ snprintf(buf, sizeof buf, "%-15s", "?");
+
+ return buf;
+ }
+@@ -951,7 +951,7 @@ procprt_CMD_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[15];
+
+- sprintf(buf, "%-14.14s", curstat->gen.name);
++ snprintf(buf, sizeof buf, "%-14.14s", curstat->gen.name);
+ return buf;
+ }
+
+@@ -961,8 +961,8 @@ procprt_CMD_e(struct tstat *curstat, int avgval, int nsecs)
+ static char buf[15]="<";
+ char helpbuf[15];
+
+- sprintf(helpbuf, "<%.12s>", curstat->gen.name);
+- sprintf(buf, "%-14.14s", helpbuf);
++ snprintf(helpbuf, sizeof helpbuf, "<%.12s>", curstat->gen.name);
++ snprintf(buf, sizeof buf, "%-14.14s", helpbuf);
+ return buf;
+ }
+
+@@ -977,7 +977,7 @@ procprt_RUID_ae(struct tstat *curstat, int avgval, int nsecs)
+
+ if ( (pwd = getpwuid(curstat->gen.ruid)) )
+ {
+- sprintf(buf, "%-8.8s", pwd->pw_name);
++ snprintf(buf, sizeof buf, "%-8.8s", pwd->pw_name);
+ }
+ else
+ {
+@@ -997,7 +997,7 @@ procprt_EUID_a(struct tstat *curstat, int avgval, int nsecs)
+
+ if ( (pwd = getpwuid(curstat->gen.euid)) )
+ {
+- sprintf(buf, "%-8.8s", pwd->pw_name);
++ snprintf(buf, sizeof buf, "%-8.8s", pwd->pw_name);
+ }
+ else
+ {
+@@ -1023,7 +1023,7 @@ procprt_SUID_a(struct tstat *curstat, int avgval, int nsecs)
+
+ if ( (pwd = getpwuid(curstat->gen.suid)) )
+ {
+- sprintf(buf, "%-8.8s", pwd->pw_name);
++ snprintf(buf, sizeof buf, "%-8.8s", pwd->pw_name);
+ }
+ else
+ {
+@@ -1049,7 +1049,7 @@ procprt_FSUID_a(struct tstat *curstat, int avgval, int nsecs)
+
+ if ( (pwd = getpwuid(curstat->gen.fsuid)) )
+ {
+- sprintf(buf, "%-8.8s", pwd->pw_name);
++ snprintf(buf, sizeof buf, "%-8.8s", pwd->pw_name);
+ }
+ else
+ {
+@@ -1085,7 +1085,7 @@ procprt_RGID_ae(struct tstat *curstat, int avgval, int nsecs)
+ groupname = grname;
+ }
+
+- sprintf(buf, "%-8.8s", groupname);
++ snprintf(buf, sizeof buf, "%-8.8s", groupname);
+ return buf;
+ }
+
+@@ -1110,7 +1110,7 @@ procprt_EGID_a(struct tstat *curstat, int avgval, int nsecs)
+ groupname = grname;
+ }
+
+- sprintf(buf, "%-8.8s", groupname);
++ snprintf(buf, sizeof buf, "%-8.8s", groupname);
+ return buf;
+ }
+
+@@ -1141,7 +1141,7 @@ procprt_SGID_a(struct tstat *curstat, int avgval, int nsecs)
+ groupname = grname;
+ }
+
+- sprintf(buf, "%-8.8s", groupname);
++ snprintf(buf, sizeof buf, "%-8.8s", groupname);
+ return buf;
+ }
+
+@@ -1172,7 +1172,7 @@ procprt_FSGID_a(struct tstat *curstat, int avgval, int nsecs)
+ groupname = grname;
+ }
+
+- sprintf(buf, "%-8.8s", groupname);
++ snprintf(buf, sizeof buf, "%-8.8s", groupname);
+ return buf;
+ }
+
+@@ -1260,7 +1260,7 @@ procprt_THR_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[15];
+
+- sprintf(buf, "%4d", curstat->gen.nthr);
++ snprintf(buf, sizeof buf, "%4d", curstat->gen.nthr);
+ return buf;
+ }
+
+@@ -1278,7 +1278,7 @@ procprt_TRUN_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[15];
+
+- sprintf(buf, "%4d", curstat->gen.nthrrun);
++ snprintf(buf, sizeof buf, "%4d", curstat->gen.nthrrun);
+ return buf;
+ }
+
+@@ -1296,7 +1296,7 @@ procprt_TSLPI_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[15];
+
+- sprintf(buf, "%5d", curstat->gen.nthrslpi);
++ snprintf(buf, sizeof buf, "%5d", curstat->gen.nthrslpi);
+ return buf;
+ }
+
+@@ -1314,7 +1314,7 @@ procprt_TSLPU_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[15];
+
+- sprintf(buf, "%5d", curstat->gen.nthrslpu);
++ snprintf(buf, sizeof buf, "%5d", curstat->gen.nthrslpu);
+ return buf;
+ }
+
+@@ -1332,7 +1332,7 @@ procprt_TIDLE_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[15];
+
+- sprintf(buf, "%5d", curstat->gen.nthridle);
++ snprintf(buf, sizeof buf, "%5d", curstat->gen.nthridle);
+ return buf;
+ }
+
+@@ -1397,7 +1397,7 @@ procprt_NICE_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[15];
+
+- sprintf(buf, "%4d", curstat->cpu.nice);
++ snprintf(buf, sizeof buf, "%4d", curstat->cpu.nice);
+ return buf;
+ }
+
+@@ -1415,7 +1415,7 @@ procprt_PRI_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[15];
+
+- sprintf(buf, "%3d", curstat->cpu.prio);
++ snprintf(buf, sizeof buf, "%3d", curstat->cpu.prio);
+ return buf;
+ }
+
+@@ -1433,7 +1433,7 @@ procprt_RTPR_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[15];
+
+- sprintf(buf, "%4d", curstat->cpu.rtprio);
++ snprintf(buf, sizeof buf, "%4d", curstat->cpu.rtprio);
+ return buf;
+ }
+
+@@ -1451,7 +1451,7 @@ procprt_CURCPU_a(struct tstat *curstat, int avgval, int nsecs)
+ {
+ static char buf[15];
+
+- sprintf(buf, "%5d", curstat->cpu.curcpu);
++ snprintf(buf, sizeof buf, "%5d", curstat->cpu.curcpu);
+ return buf;
+ }
+
+@@ -1520,7 +1520,7 @@ procprt_EXC_e(struct tstat *curstat, int avgval, int nsecs)
+ static char buf[4];
+
+
+- sprintf(buf, "%3d",
++ snprintf(buf, sizeof buf, "%3d",
+ curstat->gen.excode & 0xff ?
+ curstat->gen.excode & 0x7f :
+ (curstat->gen.excode>>8) & 0xff);
+@@ -1569,9 +1569,9 @@ procprt_COMMAND_LINE_ae(struct tstat *curstat, int avgval, int nsecs)
+ int curoffset = startoffset <= cmdlen ? startoffset : cmdlen;
+
+ if (screen)
+- sprintf(buf, "%-*.*s", curwidth, curwidth, pline+curoffset);
++ snprintf(buf, sizeof buf, "%-*.*s", curwidth, curwidth, pline+curoffset);
+ else
+- sprintf(buf, "%.*s", CMDLEN, pline+curoffset);
++ snprintf(buf, sizeof buf, "%.*s", CMDLEN, pline+curoffset);
+
+ return buf;
+ }
+@@ -2063,7 +2063,7 @@ format_bandw(char *buf, count_t kbps)
+ c = 'T';
+ }
+
+- sprintf(buf, "%4lld %cbps", kbps%100000, c);
++ snprintf(buf, bufsize, "%4lld %cbps", kbps%100000, c);
+ }
+ /***************************************************************/
+ char *
+@@ -2356,7 +2356,7 @@ showcgrouphead(detail_printpair *elemptr, int curlist, int totlist, char showord
+ }
+ else
+ {
+- col += sprintf(buf+col, "%s%s ", "", chead);
++ col += snprintf(buf+col, sizeof buf-col,"%s%s ", "", chead);
+ }
+
+ elemptr++;
+@@ -2365,7 +2365,7 @@ showcgrouphead(detail_printpair *elemptr, int curlist, int totlist, char showord
+
+ if (screen) // add page number, eat from last header if needed...
+ {
+- pagindiclen = sprintf(pagindic,"%d/%d", curlist, totlist);
++ pagindiclen = snprintf(pagindic, sizeof pagindic, "%d/%d", curlist, totlist);
+ move(curline, COLS-pagindiclen);
+ printg("%s", pagindic);
+ }
+@@ -2492,7 +2492,7 @@ cgroup_CGROUP_PATH(struct cgchainer *cgchain, struct tstat *tstat,
+ switch (cgrdepth)
+ {
+ case 0:
+- sprintf(buf, "%-*s", cgroupprt_CGROUP_PATH.width, "/");
++ snprintf(buf, sizeof buf, "%-*s", cgroupprt_CGROUP_PATH.width, "/");
+ break;
+
+ default:
+@@ -2529,13 +2529,13 @@ cgroup_CGROUP_PATH(struct cgchainer *cgchain, struct tstat *tstat,
+ addch(' ');
+ }
+
+- sprintf(buf, " %-*.*s", maxnamelen, maxnamelen,
++ snprintf(buf, sizeof buf, " %-*.*s", maxnamelen, maxnamelen,
+ cgrname+curoffset);
+ }
+ }
+ else
+ {
+- sprintf(buf, "%*s%-*.*s", cgrdepth*2, "",
++ snprintf(buf, sizeof buf, "%*s%-*.*s", cgrdepth*2, "",
+ cgroupprt_CGROUP_PATH.width - cgrdepth*2,
+ cgroupprt_CGROUP_PATH.width - cgrdepth*2,
+ cgrname);
+@@ -2959,9 +2959,9 @@ cgroup_CGRPID(struct cgchainer *cgchain, struct tstat *tstat,
+ static char buf[64];
+
+ if (tstat) // process info?
+- sprintf(buf, "%*d", cgroupprt_CGRPID.width, tstat->gen.pid);
++ snprintf(buf, sizeof buf, "%*d", cgroupprt_CGRPID.width, tstat->gen.pid);
+ else // only cgroup info
+- sprintf(buf, "%*s", cgroupprt_CGRPID.width, " ");
++ snprintf(buf, sizeof buf, "%*s", cgroupprt_CGRPID.width, " ");
+
+ return buf;
+ }
+@@ -2977,18 +2977,18 @@ cgroup_CGRCMD(struct cgchainer *cgchain, struct tstat *tstat,
+
+ if (tstat) // process info?
+ {
+- sprintf(buf, "%-14.14s", tstat->gen.name);
++ snprintf(buf, sizeof buf, "%-14.14s", tstat->gen.name);
+ }
+ else // cgroup info
+ {
+ if (cgroupdepth == 8 && cgchain->cstat->gen.depth == 0)
+ {
+- sprintf(buf, "[suppressed]");
++ snprintf(buf, sizeof buf, "[suppressed]");
+ *color = FGCOLORBORDER;
+ }
+ else
+ {
+- sprintf(buf, "%-14.14s", " ");
++ snprintf(buf, sizeof buf, "%-14.14s", " ");
+ }
+ }
+
+diff --git a/showsys.c b/showsys.c
+index 0c40198..1d0c837 100644
+--- a/showsys.c
++++ b/showsys.c
+@@ -445,7 +445,7 @@ sysprt_CPUSYS(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "sys %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "sys %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -461,7 +461,7 @@ sysprt_CPUUSER(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "user %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "user %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -477,7 +477,7 @@ sysprt_CPUIRQ(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "irq %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "irq %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -487,7 +487,7 @@ static char *
+ sysprt_CPUIDLE(struct sstat *sstat, extraparam *as, int badness, int *color)
+ {
+ static char buf[15];
+- sprintf(buf, "idle %6.0f%%",
++ snprintf(buf, sizeof buf, "idle %6.0f%%",
+ (sstat->cpu.all.itime * 100.0) / as->percputot);
+ return buf;
+ }
+@@ -498,7 +498,7 @@ static char *
+ sysprt_CPUWAIT(struct sstat *sstat, extraparam *as, int badness, int *color)
+ {
+ static char buf[15];
+- sprintf(buf, "wait %6.0f%%",
++ snprintf(buf, sizeof buf, "wait %6.0f%%",
+ (sstat->cpu.all.wtime * 100.0) / as->percputot);
+ return buf;
+ }
+@@ -515,7 +515,7 @@ sysprt_CPUISYS(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "sys %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "sys %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -532,7 +532,7 @@ sysprt_CPUIUSER(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "user %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "user %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -549,7 +549,7 @@ sysprt_CPUIIRQ(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "irq %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "irq %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -559,7 +559,7 @@ static char *
+ sysprt_CPUIIDLE(struct sstat *sstat, extraparam *as, int badness, int *color)
+ {
+ static char buf[15];
+- sprintf(buf, "idle %6.0f%%",
++ snprintf(buf, sizeof buf, "idle %6.0f%%",
+ (sstat->cpu.cpu[as->index].itime * 100.0) / as->percputot);
+ return buf;
+ }
+@@ -570,7 +570,7 @@ static char *
+ sysprt_CPUIWAIT(struct sstat *sstat, extraparam *as, int badness, int *color)
+ {
+ static char buf[15];
+- sprintf(buf, "cpu%03d w%3.0f%%",
++ snprintf(buf, sizeof buf, "cpu%03d w%3.0f%%",
+ sstat->cpu.cpu[as->index].cpunr,
+ (sstat->cpu.cpu[as->index].wtime * 100.0) / as->percputot);
+ return buf;
+@@ -638,12 +638,12 @@ dofmt_cpuscale(char *buf, count_t maxfreq, count_t cnt, count_t ticks)
+ int perc = maxfreq ? 100 * curfreq / maxfreq : 0;
+
+ strcpy(buf, "avgscal ");
+- sprintf(buf+7, "%4d%%", perc);
++ snprintf(buf+7, 6, "%4d%%", perc);
+ }
+ else if (maxfreq) // max frequency is known so % can be calculated
+ {
+ strcpy(buf, "curscal ");
+- sprintf(buf+7, "%4lld%%", 100 * cnt / maxfreq);
++ snprintf(buf+7, 6, "%4lld%%", 100 * cnt / maxfreq);
+ }
+ else // nothing is known: suppress
+ {
+@@ -764,7 +764,7 @@ sysprt_CPUSTEAL(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "steal %5.0f%%", perc);
++ snprintf(buf, sizeof buf, "steal %5.0f%%", perc);
+ return buf;
+ }
+
+@@ -780,7 +780,7 @@ sysprt_CPUISTEAL(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "steal %5.0f%%", perc);
++ snprintf(buf, sizeof buf, "steal %5.0f%%", perc);
+ return buf;
+ }
+
+@@ -795,7 +795,7 @@ sysprt_CPUGUEST(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "guest %5.0f%%", perc);
++ snprintf(buf, sizeof buf, "guest %5.0f%%", perc);
+ return buf;
+ }
+
+@@ -810,7 +810,7 @@ sysprt_CPUIGUEST(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "guest %5.0f%%", perc);
++ snprintf(buf, sizeof buf, "guest %5.0f%%", perc);
+ return buf;
+ }
+
+@@ -825,17 +825,17 @@ sysprt_CPUIPC(struct sstat *sstat, extraparam *as, int badness, int *color)
+ switch (sstat->cpu.all.cycle)
+ {
+ case 0:
+- sprintf(buf, "ipc notavail");
++ snprintf(buf, sizeof buf, "ipc notavail");
+ break;
+
+ case 1:
+ *color = FGCOLORINFO;
+- sprintf(buf, "ipc initial");
++ snprintf(buf, sizeof buf, "ipc initial");
+ break;
+
+ default:
+ ipc = sstat->cpu.all.instr * 100 / sstat->cpu.all.cycle / 100.0;
+- sprintf(buf, "ipc %8.2f", ipc);
++ snprintf(buf, sizeof buf, "ipc %8.2f", ipc);
+ }
+
+ return buf;
+@@ -858,12 +858,12 @@ sysprt_CPUIIPC(struct sstat *sstat, extraparam *as, int badness, int *color)
+ switch (sstat->cpu.all.cycle)
+ {
+ case 0:
+- sprintf(buf, "ipc notavail");
++ snprintf(buf, sizeof buf, "ipc notavail");
+ break;
+
+ case 1:
+ *color = FGCOLORINFO;
+- sprintf(buf, "ipc initial");
++ snprintf(buf, sizeof buf, "ipc initial");
+ break;
+
+ default:
+@@ -871,7 +871,7 @@ sysprt_CPUIIPC(struct sstat *sstat, extraparam *as, int badness, int *color)
+ ipc = sstat->cpu.cpu[as->index].instr * 100 /
+ sstat->cpu.cpu[as->index].cycle / 100.0;
+
+- sprintf(buf, "ipc %8.2f", ipc);
++ snprintf(buf, sizeof buf, "ipc %8.2f", ipc);
+ }
+
+ return buf;
+@@ -887,12 +887,12 @@ sysprt_CPUCYCLE(struct sstat *sstat, extraparam *as, int badness, int *color)
+ switch (sstat->cpu.all.cycle)
+ {
+ case 0:
+- sprintf(buf+5, "missing");
++ snprintf(buf+5, sizeof buf-5, "missing");
+ break;
+
+ case 1:
+ *color = FGCOLORINFO;
+- sprintf(buf+5, "initial");
++ snprintf(buf+5, sizeof buf-5, "initial");
+ break;
+
+ default:
+@@ -913,12 +913,12 @@ sysprt_CPUICYCLE(struct sstat *sstat, extraparam *as, int badness, int *color)
+ switch (sstat->cpu.all.cycle)
+ {
+ case 0:
+- sprintf(buf+5, "missing");
++ snprintf(buf+5, sizeof buf-5, "missing");
+ break;
+
+ case 1:
+ *color = FGCOLORINFO;
+- sprintf(buf+5, "initial");
++ snprintf(buf+5, sizeof buf-5, "initial");
+ break;
+
+ default:
+@@ -938,15 +938,15 @@ sysprt_CPLAVG1(struct sstat *sstat, extraparam *notused, int badness, int *color
+
+ if (sstat->cpu.lavg1 > 999999.0)
+ {
+- sprintf(buf+5, ">999999");
++ snprintf(buf+5, sizeof buf-5, ">999999");
+ }
+ else if (sstat->cpu.lavg1 > 999.0)
+ {
+- sprintf(buf+5, "%7.0f", sstat->cpu.lavg1);
++ snprintf(buf+5, sizeof buf-5, "%7.0f", sstat->cpu.lavg1);
+ }
+ else
+ {
+- sprintf(buf+5, "%7.2f", sstat->cpu.lavg1);
++ snprintf(buf+5, sizeof buf-5, "%7.2f", sstat->cpu.lavg1);
+ }
+ return buf;
+ }
+@@ -960,15 +960,15 @@ sysprt_CPLAVG5(struct sstat *sstat, extraparam *notused, int badness, int *color
+
+ if (sstat->cpu.lavg5 > 999999.0)
+ {
+- sprintf(buf+5, ">999999");
++ snprintf(buf+5, sizeof buf-5, ">999999");
+ }
+ else if (sstat->cpu.lavg5 > 999.0)
+ {
+- sprintf(buf+5, "%7.0f", sstat->cpu.lavg5);
++ snprintf(buf+5, sizeof buf-5, "%7.0f", sstat->cpu.lavg5);
+ }
+ else
+ {
+- sprintf(buf+5, "%7.2f", sstat->cpu.lavg5);
++ snprintf(buf+5, sizeof buf-5, "%7.2f", sstat->cpu.lavg5);
+ }
+ return buf;
+ }
+@@ -985,15 +985,15 @@ sysprt_CPLAVG15(struct sstat *sstat, extraparam *notused, int badness, int *colo
+
+ if (sstat->cpu.lavg15 > 99999.0)
+ {
+- sprintf(buf+6, ">99999");
++ snprintf(buf+6, sizeof buf-6, ">99999");
+ }
+ else if (sstat->cpu.lavg15 > 999.0)
+ {
+- sprintf(buf+6, "%6.0f", sstat->cpu.lavg15);
++ snprintf(buf+6, sizeof buf-6, "%6.0f", sstat->cpu.lavg15);
+ }
+ else
+ {
+- sprintf(buf+6, "%6.2f", sstat->cpu.lavg15);
++ snprintf(buf+6, sizeof buf-6, "%6.2f", sstat->cpu.lavg15);
+ }
+ return buf;
+ }
+@@ -1056,7 +1056,7 @@ sysprt_GPUBUS(struct sstat *sstat, extraparam *as, int badness, int *color)
+ else
+ pn = sstat->gpu.gpu[as->index].busid;
+
+- sprintf(buf, "%9.9s %2d", pn, sstat->gpu.gpu[as->index].gpunr);
++ snprintf(buf, sizeof buf, "%9.9s %2d", pn, sstat->gpu.gpu[as->index].gpunr);
+ return buf;
+ }
+
+@@ -1074,7 +1074,7 @@ sysprt_GPUTYPE(struct sstat *sstat, extraparam *as, int badness, int *color)
+ else
+ pn = sstat->gpu.gpu[as->index].type;
+
+- sprintf(buf, "%12.12s", pn);
++ snprintf(buf, sizeof buf, "%12.12s", pn);
+ return buf;
+ }
+
+@@ -1099,7 +1099,7 @@ sysprt_GPUMEMPERC(struct sstat *sstat, extraparam *as, int badness, int *color)
+
+ if (perc == -1)
+ {
+- sprintf(buf+8, " N/A");
++ snprintf(buf+8, sizeof buf-8, " N/A");
+ }
+ else
+ {
+@@ -1127,7 +1127,7 @@ sysprt_GPUGPUPERC(struct sstat *sstat, extraparam *as, int badness, int *color)
+
+ if (perc == -1) // metric not available?
+ {
+- sprintf(buf+8, " N/A");
++ snprintf(buf+8, sizeof buf-8, " N/A");
+ }
+ else
+ {
+@@ -1835,7 +1835,7 @@ sysprt_NUMANR(struct sstat *sstat, extraparam *as, int badness, int *color)
+ {
+ static char buf[16];
+ *color = -1;
+- sprintf(buf, "numanode%04d", sstat->memnuma.numa[as->index].numanr);
++ snprintf(buf, sizeof buf, "numanode%04d", sstat->memnuma.numa[as->index].numanr);
+ return buf;
+ }
+
+@@ -1915,7 +1915,7 @@ sysprt_NUMAFRAG(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "frag %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "frag %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -1971,7 +1971,7 @@ sysprt_NUMACPUSYS(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "sys %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "sys %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -1986,7 +1986,7 @@ sysprt_NUMACPUUSER(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "user %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "user %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -2001,7 +2001,7 @@ sysprt_NUMACPUNICE(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "nice %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "nice %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -2016,7 +2016,7 @@ sysprt_NUMACPUIRQ(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "irq %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "irq %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -2031,7 +2031,7 @@ sysprt_NUMACPUSOFTIRQ(struct sstat *sstat, extraparam *as, int badness, int *col
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "sirq %6.0f%%", perc);
++ snprintf(buf, sizeof buf, "sirq %6.0f%%", perc);
+ return buf;
+ }
+
+@@ -2042,7 +2042,7 @@ sysprt_NUMACPUIDLE(struct sstat *sstat, extraparam *as, int badness, int *color)
+ {
+ static char buf[15];
+
+- sprintf(buf, "idle %6.0f%%",
++ snprintf(buf, sizeof buf, "idle %6.0f%%",
+ (sstat->cpunuma.numa[as->index].itime * 100.0) / as->percputot);
+ return buf;
+ }
+@@ -2054,7 +2054,7 @@ sysprt_NUMACPUWAIT(struct sstat *sstat, extraparam *as, int badness, int *color)
+ {
+ static char buf[15];
+
+- sprintf(buf, "nod%03d w%3.0f%%",
++ snprintf(buf, sizeof buf, "nod%03d w%3.0f%%",
+ sstat->cpunuma.numa[as->index].numanr,
+ (sstat->cpunuma.numa[as->index].wtime * 100.0) / as->percputot);
+ return buf;
+@@ -2072,7 +2072,7 @@ sysprt_NUMACPUSTEAL(struct sstat *sstat, extraparam *as, int badness, int *color
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "steal %5.0f%%", perc);
++ snprintf(buf, sizeof buf, "steal %5.0f%%", perc);
+ return buf;
+ }
+
+@@ -2088,7 +2088,7 @@ sysprt_NUMACPUGUEST(struct sstat *sstat, extraparam *as, int badness, int *color
+ if (perc > 1.0)
+ *color = -1;
+
+- sprintf(buf, "guest %5.0f%%", perc);
++ snprintf(buf, sizeof buf, "guest %5.0f%%", perc);
+ return buf;
+ }
+
+@@ -2122,7 +2122,7 @@ sysprt_NUMLLC(struct sstat *sstat, extraparam *as, int badness, int *color)
+ static char buf[16];
+
+ *color = -1;
+- sprintf(buf, "LLC%02d %5.0f%%", sstat->llc.perllc[as->index].id, sstat->llc.perllc[as->index].occupancy * 100);
++ snprintf(buf, sizeof buf, "LLC%02d %5.0f%%", sstat->llc.perllc[as->index].id, sstat->llc.perllc[as->index].occupancy * 100);
+ return buf;
+ }
+
+@@ -2278,7 +2278,7 @@ sysprt_CONTNAME(struct sstat *sstat, extraparam *as, int badness, int *color)
+
+ *color = -1;
+
+- sprintf(buf+5, "%7lu", sstat->cfs.cont[as->index].ctid);
++ snprintf(buf+5, sizeof buf-5, "%7lu", sstat->cfs.cont[as->index].ctid);
+ return buf;
+ }
+
+@@ -2313,10 +2313,10 @@ sysprt_CONTCPU(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (sstat->cfs.cont[as->index].uptime)
+ {
+ perc = used * 100.0 / sstat->cfs.cont[as->index].uptime;
+- sprintf(buf, "cpubusy %3.0f%%", perc);
++ snprintf(buf, sizeof buf, "cpubusy %3.0f%%", perc);
+ }
+ else
+- sprintf(buf, "cpubusy ?%%");
++ snprintf(buf, sizeof buf, "cpubusy ?%%");
+
+ return buf;
+ }
+@@ -2351,7 +2351,7 @@ sysprt_DSKNAME(struct sstat *sstat, extraparam *as, int badness, int *color)
+ else
+ pn = as->perdsk[as->index].name;
+
+- sprintf(buf, "%12.12s", pn);
++ snprintf(buf, sizeof buf, "%12.12s", pn);
+ return buf;
+ }
+
+@@ -2368,9 +2368,9 @@ sysprt_DSKBUSY(struct sstat *sstat, extraparam *as, int badness, int *color)
+ perc = as->perdsk[as->index].io_ms * 100.0 / as->mstot;
+
+ if (perc >= 0.0 && perc < 1000000.0)
+- sprintf(buf+5, "%6.0lf%%", perc);
++ snprintf(buf+5, sizeof buf-5, "%6.0lf%%", perc);
+ else
+- sprintf(buf+5, "%6.0lf%%", 999999.0);
++ snprintf(buf+5, sizeof buf-5, "%6.0lf%%", 999999.0);
+
+ return buf;
+ }
+@@ -2517,7 +2517,7 @@ sysprt_DSKAVQUEUE(struct sstat *sstat, extraparam *as, int badness, int *color)
+ static char buf[16]="avq ";
+ struct perdsk *dp = &(as->perdsk[as->index]);
+
+- sprintf(buf+4, "%8.2f", dp->io_ms > 0 ?
++ snprintf(buf+4, sizeof buf-4, "%8.2f", dp->io_ms > 0 ?
+ (double)dp->avque / dp->io_ms : 0.0);
+ return buf;
+ }
+@@ -2536,31 +2536,31 @@ sysprt_DSKAVIO(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (avioms >= 9995.0)
+ {
+ val2valstr((unsigned long long)avioms / 1000, buf+5, 5, 0, 0);
+- sprintf(buf+10, " s");
++ snprintf(buf+10, sizeof buf-10, " s");
+ }
+ else if (avioms >= 99.95)
+ {
+- sprintf(buf+5, "%4.0lf ms", avioms);
++ snprintf(buf+5, sizeof buf-5, "%4.0lf ms", avioms);
+ }
+ else if (avioms >= 9.995)
+ {
+- sprintf(buf+5, "%4.1lf ms", avioms);
++ snprintf(buf+5, sizeof buf-5, "%4.1lf ms", avioms);
+ }
+ else if (avioms >= 0.09995)
+ {
+- sprintf(buf+5, "%4.2lf ms", avioms);
++ snprintf(buf+5, sizeof buf-5, "%4.2lf ms", avioms);
+ }
+ else if (avioms >= 0.01)
+ {
+- sprintf(buf+5, "%4.1lf µs", avioms * 1000.0);
++ snprintf(buf+5, sizeof buf-5, "%4.1lf µs", avioms * 1000.0);
+ }
+ else if (avioms >= 0.0001)
+ {
+- sprintf(buf+5, "%4.2lf µs", avioms * 1000.0);
++ snprintf(buf+5, sizeof buf-5, "%4.2lf µs", avioms * 1000.0);
+ }
+ else
+ {
+- sprintf(buf+5, "%4.1lf ns", avioms * 1000000.0);
++ snprintf(buf+5, sizeof buf-5, "%4.1lf ns", avioms * 1000000.0);
+ }
+
+ return buf;
+@@ -3183,7 +3183,7 @@ sysprt_NFMSERVER(struct sstat *sstat, extraparam *as, int badness, int *color)
+ else
+ strcpy(mntdev, "?");
+
+- sprintf(buf+4, "%8.8s", mntdev);
++ snprintf(buf+4, sizeof buf-4, "%8.8s", mntdev);
+ return buf;
+ }
+
+@@ -3208,7 +3208,7 @@ sysprt_NFMPATH(struct sstat *sstat, extraparam *as, int badness, int *color)
+ if (len > 12)
+ ps = ps + len - 12;
+
+- sprintf(buf, "%12.12s", ps);
++ snprintf(buf, sizeof buf, "%12.12s", ps);
+ return buf;
+ }
+
+@@ -3458,7 +3458,7 @@ sysprt_NFSNRBYTES(struct sstat *sstat, extraparam *as, int badness, int *color)
+ {
+ static char buf[32]="MBcr/s ";
+
+- sprintf(buf+7, "%5.1lf",
++ snprintf(buf+7, sizeof buf-7, "%5.1lf",
+ sstat->nfs.server.nrbytes / 1024.0 / 1024.0 / as->nsecs);
+
+ return buf;
+@@ -3471,7 +3471,7 @@ sysprt_NFSNWBYTES(struct sstat *sstat, extraparam *as, int badness, int *color)
+ {
+ static char buf[32]="MBcw/s ";
+
+- sprintf(buf+7, "%5.1lf",
++ snprintf(buf+7, sizeof buf-7, "%5.1lf",
+ sstat->nfs.server.nwbytes / 1024.0 / 1024.0 / as->nsecs);
+
+ return buf;
diff -Nru atop-2.11.1/debian/patches/0017-new-parameter-for-formatr_bandw-to-get-rid-of-sprint.patch atop-2.11.1/debian/patches/0017-new-parameter-for-formatr_bandw-to-get-rid-of-sprint.patch
--- atop-2.11.1/debian/patches/0017-new-parameter-for-formatr_bandw-to-get-rid-of-sprint.patch 1970-01-01 01:00:00.000000000 +0100
+++ atop-2.11.1/debian/patches/0017-new-parameter-for-formatr_bandw-to-get-rid-of-sprint.patch 2025-05-28 18:07:22.000000000 +0200
@@ -0,0 +1,68 @@
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 21:05:01 +0200
+Subject: new parameter for formatr_bandw to get rid of sprintf
+
+Author: Gerlof Langeveld
+Forwarded: not-needed
+---
+ showprocs.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/showprocs.c b/showprocs.c
+index b8e5db9..c1cda01 100644
+--- a/showprocs.c
++++ b/showprocs.c
+@@ -60,7 +60,7 @@
+ #include "showgeneric.h"
+ #include "showlinux.h"
+
+-static void format_bandw(char *, count_t);
++static void format_bandw(char *, int, count_t);
+ static void gettotwidth(detail_printpair *, int *, int *, int *);
+ static int *getspacings(detail_printpair *);
+
+@@ -1986,7 +1986,7 @@ procprt_BANDWI_a(struct tstat *curstat, int avgval, int nsecs)
+ static char buf[16];
+ count_t rkbps = (curstat->net.tcprsz+curstat->net.udprsz)/125/nsecs;
+
+- format_bandw(buf, rkbps);
++ format_bandw(buf, sizeof buf, rkbps);
+ return buf;
+ }
+
+@@ -1999,7 +1999,7 @@ procprt_BANDWI_e(struct tstat *curstat, int avgval, int nsecs)
+ count_t rkbps = (curstat->net.tcprsz + curstat->net.udprsz)
+ /125/nsecs;
+
+- format_bandw(buf, rkbps);
++ format_bandw(buf, sizeof buf, rkbps);
+ return buf;
+ }
+ else
+@@ -2015,7 +2015,7 @@ procprt_BANDWO_a(struct tstat *curstat, int avgval, int nsecs)
+ static char buf[16];
+ count_t skbps = (curstat->net.tcpssz+curstat->net.udpssz)/125/nsecs;
+
+- format_bandw(buf, skbps);
++ format_bandw(buf, sizeof buf, skbps);
+ return buf;
+ }
+
+@@ -2028,7 +2028,7 @@ procprt_BANDWO_e(struct tstat *curstat, int avgval, int nsecs)
+ count_t skbps = (curstat->net.tcpssz + curstat->net.udpssz)
+ /125/nsecs;
+
+- format_bandw(buf, skbps);
++ format_bandw(buf, sizeof buf, skbps);
+ return buf;
+ }
+ else
+@@ -2039,7 +2039,7 @@ detail_printdef procprt_BANDWO =
+ { " BANDWO", "BANDWO", procprt_BANDWO_a, procprt_BANDWO_e, ' ', 9};
+ /***************************************************************/
+ static void
+-format_bandw(char *buf, count_t kbps)
++format_bandw(char *buf, int bufsize, count_t kbps)
+ {
+ char c;
+
diff -Nru atop-2.11.1/debian/patches/0018-fix-buffer-overflow-crash-on-Raspberry-Pi-5-fake-NUM.patch atop-2.11.1/debian/patches/0018-fix-buffer-overflow-crash-on-Raspberry-Pi-5-fake-NUM.patch
--- atop-2.11.1/debian/patches/0018-fix-buffer-overflow-crash-on-Raspberry-Pi-5-fake-NUM.patch 1970-01-01 01:00:00.000000000 +0100
+++ atop-2.11.1/debian/patches/0018-fix-buffer-overflow-crash-on-Raspberry-Pi-5-fake-NUM.patch 2025-05-28 18:07:22.000000000 +0200
@@ -0,0 +1,125 @@
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 21:05:56 +0200
+Subject: fix buffer overflow crash on Raspberry Pi 5 (fake NUMA architecture)
+
+Closes: #1106234
+Thanks: Gerlof Langeveld
+Author: Gerlof Langeveld
+Forwarded: not-needed
+---
+ photosyst.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ photosyst.h | 1 +
+ showlinux.c | 12 ++++++++----
+ 3 files changed, 60 insertions(+), 4 deletions(-)
+
+diff --git a/photosyst.c b/photosyst.c
+index 2f862fd..5670393 100644
+--- a/photosyst.c
++++ b/photosyst.c
+@@ -2646,6 +2646,57 @@ get_ksm(struct sstat *si)
+ }
+
+
++/*
++** determine if this system uses *real* NUMA rather than *fake* NUMA
++** that is the case when not all node distances have the same value
++*/
++#define NUMADISTANCE0 "/sys/devices/system/node/node0/distance"
++
++int
++uses_realnuma(void)
++{
++ static int realnuma = -1;
++ FILE *fp;
++ int i, total, nr=0, dist[10];
++ char linebuf[1024];
++
++ if (realnuma == -1) // first call?
++ {
++ if ( (fp = fopen(NUMADISTANCE0, "r")) != NULL)
++ {
++ if ( fgets(linebuf, sizeof(linebuf), fp) != NULL)
++ {
++ nr = sscanf(linebuf, "%d %d %d %d %d %d %d %d %d %d",
++ &dist[0], &dist[1], &dist[2], &dist[3],
++ &dist[4], &dist[5], &dist[6], &dist[7],
++ &dist[8], &dist[9]);
++ }
++
++ fclose(fp);
++ }
++
++ if (nr <= 0)
++ {
++ realnuma = 0; // probably fake NUMA
++ }
++ else
++ {
++ // totalize all distances
++ for (i=0, total=0; i < nr; i++)
++ total += dist[i];
++
++ // average distance not equal to the first distance?
++ if (total / i != dist[0])
++ realnuma = 1; // real NUMA
++ else
++ realnuma = 0; // fake NUMA
++ }
++ }
++
++ return realnuma;
++}
++
++
+ #if HTTPSTATS
+ /*
+ ** retrieve statistics from local HTTP daemons
+diff --git a/photosyst.h b/photosyst.h
+index 600fb36..ebe4115 100644
+--- a/photosyst.h
++++ b/photosyst.h
+@@ -468,6 +468,7 @@ void deviatsyst(struct sstat *, struct sstat *, struct sstat *, long);
+ void totalsyst (char, struct sstat *, struct sstat *);
+ void do_perfevents(char *, char *);
+ int isdisk_major(unsigned int);
++int uses_realnuma(void);
+
+ /*
+ ** return value of isdisk_...()
+diff --git a/showlinux.c b/showlinux.c
+index 3bdf804..817e967 100644
+--- a/showlinux.c
++++ b/showlinux.c
+@@ -1969,7 +1969,7 @@ prisyst(struct sstat *sstat, int curline, int nsecs, int avgval,
+ /*
+ ** memory info related for per NUMA
+ */
+- if (sstat->memnuma.nrnuma > 1)
++ if (sstat->memnuma.nrnuma > 1 && uses_realnuma())
+ {
+ for (extra.index=lin=0;
+ extra.index < sstat->memnuma.nrnuma && lin < maxnumalines;
+@@ -2005,7 +2005,7 @@ prisyst(struct sstat *sstat, int curline, int nsecs, int avgval,
+ /*
+ ** Accumulate each cpu statistic for per NUMA
+ */
+- if (sstat->cpunuma.nrnuma > 1)
++ if (sstat->cpunuma.nrnuma > 1 && uses_realnuma())
+ {
+ for (extra.index=lin=0;
+ extra.index < sstat->cpunuma.nrnuma && lin < maxnumalines;
+@@ -2045,8 +2045,12 @@ prisyst(struct sstat *sstat, int curline, int nsecs, int avgval,
+ *highorderp = MSORTCPU;
+ }
+
+- extra.percputot = extra.pernumacputot /
+- (sstat->cpu.nrcpu/sstat->cpunuma.nrnuma);
++ if (sstat->cpunuma.numa[extra.index].nrcpu)
++ extra.percputot = extra.pernumacputot /
++ sstat->cpunuma.numa[extra.index].nrcpu;
++ else
++ extra.percputot = 1;
++
+ if (extra.percputot == 0)
+ extra.percputot = 1; /* avoid divide-by-zero */
+
diff -Nru atop-2.11.1/debian/patches/atopacct.service.patch atop-2.11.1/debian/patches/atopacct.service.patch
--- atop-2.11.1/debian/patches/atopacct.service.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/atopacct.service.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,15 @@
-Description: adapt upstreams service file to Debian
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: adapt upstreams service file to Debian
+
Forwarded: not-needed
Last-Update: 2016-08-07
+---
+ atopacct.service | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/atopacct.service b/atopacct.service
+index 3aa529d..cab54ae 100644
--- a/atopacct.service
+++ b/atopacct.service
@@ -1,6 +1,7 @@
diff -Nru atop-2.11.1/debian/patches/atop-pm.patch atop-2.11.1/debian/patches/atop-pm.patch
--- atop-2.11.1/debian/patches/atop-pm.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/atop-pm.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,16 @@
-Description: install atop-pm to /etc/systemd/system-sleep/atop-pm
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: install atop-pm to /etc/systemd/system-sleep/atop-pm
+
Forwarded: not-needed
Last-Update: 2016-10-25
+---
+ Makefile | 6 +++---
+ atop-pm.sh | 6 ++++--
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8e5da0e..6cba06c 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ CRNPATH = /etc/cron.d
@@ -24,6 +33,8 @@
#
# only when making on target system:
#
+diff --git a/atop-pm.sh b/atop-pm.sh
+index 3ff4ab5..1ccb14f 100755
--- a/atop-pm.sh
+++ b/atop-pm.sh
@@ -1,10 +1,12 @@
diff -Nru atop-2.11.1/debian/patches/atop-rotate-systemctl-path.patch atop-2.11.1/debian/patches/atop-rotate-systemctl-path.patch
--- atop-2.11.1/debian/patches/atop-rotate-systemctl-path.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/atop-rotate-systemctl-path.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,15 @@
-Description: systemctl is in /bin on Debian
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: systemctl is in /bin on Debian
+
Forwarded: not-needed
Last-Update: 2022-08-10
+---
+ atop-rotate.service | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/atop-rotate.service b/atop-rotate.service
+index dbe8e0f..3753977 100644
--- a/atop-rotate.service
+++ b/atop-rotate.service
@@ -4,4 +4,4 @@ Documentation=man:atop(1)
diff -Nru atop-2.11.1/debian/patches/default.patch atop-2.11.1/debian/patches/default.patch
--- atop-2.11.1/debian/patches/default.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/default.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,15 @@
-Description: create Debian's atop.default file as patched from Upstream's
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: create Debian's atop.default file as patched from Upstream's
+
Forwarded: not-needed
Last-Update: 2019-02-17
+---
+ atop.default | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/atop.default b/atop.default
+index 18ebdf4..e5ab6bd 100644
--- a/atop.default
+++ b/atop.default
@@ -1,3 +1,6 @@
diff -Nru atop-2.11.1/debian/patches/dh_installinit.patch atop-2.11.1/debian/patches/dh_installinit.patch
--- atop-2.11.1/debian/patches/dh_installinit.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/dh_installinit.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,15 @@
-Description: do not install init scripts directly
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: do not install init scripts directly
+
Forwarded: not-needed
Last-Update: 2016-08-07
+---
+ Makefile | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index cb27833..5a57d8d 100644
--- a/Makefile
+++ b/Makefile
@@ -98,8 +98,6 @@ sysvinstall: genericinstall
diff -Nru atop-2.11.1/debian/patches/dh_systemd_enable.patch atop-2.11.1/debian/patches/dh_systemd_enable.patch
--- atop-2.11.1/debian/patches/dh_systemd_enable.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/dh_systemd_enable.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,15 @@
-Description: do not install atop.service and atopacct.service
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: do not install atop.service and atopacct.service
+
Forwarded: not-needed
Last-Update: 2016-08-07
+---
+ Makefile | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index fd7ad92..cb27833 100644
--- a/Makefile
+++ b/Makefile
@@ -67,16 +67,10 @@ install: genericinstall
diff -Nru atop-2.11.1/debian/patches/disable-mkdate.patch atop-2.11.1/debian/patches/disable-mkdate.patch
--- atop-2.11.1/debian/patches/disable-mkdate.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/disable-mkdate.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,16 @@
-Description: disable mkdate, keep versdate.h at original
- this is supposed to help with reproducibility
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: disable mkdate, keep versdate.h at original
+
Forwarded: not-needed
+
+ this is supposed to help with reproducibility
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 3a63f69..fd7ad92 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ atophide: atophide.o
@@ -13,7 +22,7 @@
distr:
rm -f *.o atop
-@@ -187,7 +187,7 @@ genericinstall: atop atopacctd atopconve
+@@ -187,7 +187,7 @@ genericinstall: atop atopacctd atopconvert atopcat atophide
##########################################################################
versdate.h:
diff -Nru atop-2.11.1/debian/patches/force-reload.patch atop-2.11.1/debian/patches/force-reload.patch
--- atop-2.11.1/debian/patches/force-reload.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/force-reload.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,17 @@
-Description: force-reload is required, and restart|force-reload should not be a no-op
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: force-reload is required,
+ and restart|force-reload should not be a no-op
+
Forwarded: not-needed
Last-Update: 2016-08-07
+---
+ atop.init | 2 +-
+ atopacct.init | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/atop.init b/atop.init
+index eec2401..be60584 100755
--- a/atop.init
+++ b/atop.init
@@ -71,7 +71,7 @@ case "$1" in
@@ -13,6 +23,8 @@
/usr/share/atop/atop.daily&
;;
+diff --git a/atopacct.init b/atopacct.init
+index a57615a..668d902 100755
--- a/atopacct.init
+++ b/atopacct.init
@@ -77,7 +77,9 @@ case "$1" in
diff -Nru atop-2.11.1/debian/patches/handle-default-file.patch atop-2.11.1/debian/patches/handle-default-file.patch
--- atop-2.11.1/debian/patches/handle-default-file.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/handle-default-file.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,10 +1,18 @@
-Description: Debian packaging handles /etc/defaults file itself
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: Debian packaging handles /etc/defaults file itself
+
Forwarded: not-needed
Last-Update: 2020-11-19
+---
+ Makefile | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2a01e9a..1250f70 100644
--- a/Makefile
+++ b/Makefile
-@@ -147,9 +147,6 @@ genericinstall: atop atopacctd atopconve
+@@ -147,9 +147,6 @@ genericinstall: atop atopacctd atopconvert atopcat atophide
if [ ! -d $(DESTDIR)$(MAN8PATH) ]; \
then mkdir -p $(DESTDIR)$(MAN8PATH); fi
#
diff -Nru atop-2.11.1/debian/patches/init-script-lsb-headers.patch atop-2.11.1/debian/patches/init-script-lsb-headers.patch
--- atop-2.11.1/debian/patches/init-script-lsb-headers.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/init-script-lsb-headers.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,15 @@
-Description: Short-Description and Description were swapped
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: Short-Description and Description were swapped
+
Forwarded: not-needed
Last-Update: 2016-08-07
+---
+ atopacct.init | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/atopacct.init b/atopacct.init
+index c681f55..a57615a 100755
--- a/atopacct.init
+++ b/atopacct.init
@@ -11,10 +11,10 @@
diff -Nru atop-2.11.1/debian/patches/lsb-init-functions.patch atop-2.11.1/debian/patches/lsb-init-functions.patch
--- atop-2.11.1/debian/patches/lsb-init-functions.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/lsb-init-functions.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,16 @@
-Description: call isb/init-functions for systemd compatibility
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: call isb/init-functions for systemd compatibility
+
Forwarded: not-needed
Last-Update: 2016-08-07
+---
+ atop.init | 2 ++
+ atopacct.init | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/atop.init b/atop.init
+index 8109457..eec2401 100755
--- a/atop.init
+++ b/atop.init
@@ -15,6 +15,8 @@
@@ -13,6 +22,8 @@
# Check existance of binaries
[ -f /usr/bin/atop ] || exit 0
+diff --git a/atopacct.init b/atopacct.init
+index e4d06a8..c681f55 100755
--- a/atopacct.init
+++ b/atopacct.init
@@ -17,6 +17,8 @@
diff -Nru atop-2.11.1/debian/patches/no-atopgpud.patch atop-2.11.1/debian/patches/no-atopgpud.patch
--- atop-2.11.1/debian/patches/no-atopgpud.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/no-atopgpud.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,10 +1,18 @@
-Description: do not install atopgpud
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: do not install atopgpud
+
Forwarded: not-needed
Last-Update: 2019-01-18
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 6cba06c..2a01e9a 100644
--- a/Makefile
+++ b/Makefile
-@@ -155,8 +155,8 @@ genericinstall: atop atopacctd atopconve
+@@ -155,8 +155,8 @@ genericinstall: atop atopacctd atopconvert atopcat atophide
ln -sf atop $(DESTDIR)$(BINPATH)/atopsar
cp atopacctd $(DESTDIR)$(SBINPATH)/atopacctd
chmod 0700 $(DESTDIR)$(SBINPATH)/atopacctd
@@ -15,7 +23,7 @@
cp atopconvert $(DESTDIR)$(BINPATH)/atopconvert
chmod 0711 $(DESTDIR)$(BINPATH)/atopconvert
cp atopcat $(DESTDIR)$(BINPATH)/atopcat
-@@ -170,7 +170,7 @@ genericinstall: atop atopacctd atopconve
+@@ -170,7 +170,7 @@ genericinstall: atop atopacctd atopconvert atopcat atophide
cp man/atophide.1 $(DESTDIR)$(MAN1PATH)
cp man/atoprc.5 $(DESTDIR)$(MAN5PATH)
cp man/atopacctd.8 $(DESTDIR)$(MAN8PATH)
diff -Nru atop-2.11.1/debian/patches/no-files-in-var-log.patch atop-2.11.1/debian/patches/no-files-in-var-log.patch
--- atop-2.11.1/debian/patches/no-files-in-var-log.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/no-files-in-var-log.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,15 @@
-Description: don't create dummy files in log dir on package build
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: don't create dummy files in log dir on package build
+
Forwarded: not-needed
Last-Update: 2016-08-07
+---
+ Makefile | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 5a57d8d..6b7817d 100644
--- a/Makefile
+++ b/Makefile
@@ -101,8 +101,6 @@ sysvinstall: genericinstall
diff -Nru atop-2.11.1/debian/patches/no-version-symlinks.patch atop-2.11.1/debian/patches/no-version-symlinks.patch
--- atop-2.11.1/debian/patches/no-version-symlinks.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/no-version-symlinks.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,10 +1,18 @@
-Description: do not symlink atop(sar)-$(VERS)
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: do not symlink atop(sar)-$(VERS)
+
Forwarded: via web form
Last-Update: 2016-08-07
+---
+ Makefile | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 6b7817d..8e5da0e 100644
--- a/Makefile
+++ b/Makefile
-@@ -157,8 +157,6 @@ genericinstall: atop atopacctd atopconve
+@@ -157,8 +157,6 @@ genericinstall: atop atopacctd atopconvert atopcat atophide
chmod 0700 $(DESTDIR)$(SBINPATH)/atopacctd
cp atopgpud $(DESTDIR)$(SBINPATH)/atopgpud
chmod 0700 $(DESTDIR)$(SBINPATH)/atopgpud
diff -Nru atop-2.11.1/debian/patches/series atop-2.11.1/debian/patches/series
--- atop-2.11.1/debian/patches/series 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/series 2025-05-28 18:07:22.000000000 +0200
@@ -13,3 +13,6 @@
no-atopgpud.patch
handle-default-file.patch
default.patch
+0016-replace-sprintf-with-snprintf.patch
+0017-new-parameter-for-formatr_bandw-to-get-rid-of-sprint.patch
+0018-fix-buffer-overflow-crash-on-Raspberry-Pi-5-fake-NUM.patch
diff -Nru atop-2.11.1/debian/patches/var-run.patch atop-2.11.1/debian/patches/var-run.patch
--- atop-2.11.1/debian/patches/var-run.patch 2025-05-04 18:41:13.000000000 +0200
+++ atop-2.11.1/debian/patches/var-run.patch 2025-05-28 18:07:22.000000000 +0200
@@ -1,7 +1,20 @@
-Description: replace /var/run with /run
-Author: Marc Haber <mh+debian-packages@zugschlus.de>
+From: Marc Haber <mh+debian-packages@zugschlus.de>
+Date: Sun, 25 May 2025 20:54:51 +0200
+Subject: replace /var/run with /run
+
Forwarded: via web form
Last-Update: 2016-08-07
+---
+ 45atoppm | 2 +-
+ atop.daily | 2 +-
+ atop.init | 6 +++---
+ man/atop.1 | 4 ++--
+ man/atopacctd.8 | 8 ++++----
+ man/atoprc.5 | 2 +-
+ 6 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/45atoppm b/45atoppm
+index 231979d..d359d76 100755
--- a/45atoppm
+++ b/45atoppm
@@ -4,7 +4,7 @@
@@ -13,6 +26,8 @@
INTERVAL=600 # interval 10 minutes
CURDAY=`date +%Y%m%d` # current date in same format
+diff --git a/atop.daily b/atop.daily
+index d44fd15..2508426 100755
--- a/atop.daily
+++ b/atop.daily
@@ -28,7 +28,7 @@ fi
@@ -24,6 +39,8 @@
# verify if atop still runs for daily logging
#
+diff --git a/atop.init b/atop.init
+index be60584..3764201 100755
--- a/atop.init
+++ b/atop.init
@@ -20,7 +20,7 @@
@@ -53,6 +70,8 @@
;;
status)
+diff --git a/man/atop.1 b/man/atop.1
+index f161de5..9802ea3 100644
--- a/man/atop.1
+++ b/man/atop.1
@@ -3087,7 +3087,7 @@ processes sorted on memory consumption:
@@ -64,7 +83,7 @@
Directory containing the process accounting shadow files that are
used by
.I atop
-@@ -3147,7 +3147,7 @@ All binary system and process level data
+@@ -3147,7 +3147,7 @@ All binary system and process level data in this file has been stored
in compressed format.
.PP
.TP 5
@@ -73,9 +92,11 @@
File that contains the netpertask structs containing the network
counters of exited processes. These structs are written by the
.I netatopd
+diff --git a/man/atopacctd.8 b/man/atopacctd.8
+index 4e014a7..0be957a 100644
--- a/man/atopacctd.8
+++ b/man/atopacctd.8
-@@ -70,7 +70,7 @@ any more. As soon as at least one client
+@@ -70,7 +70,7 @@ any more. As soon as at least one client is activate again, the
daemon continues writing shadow files.
.PP
The directory
@@ -105,9 +126,11 @@
Regular files containing the process accounting records that have
been copied transparently from the source file (N represents a 10-digit
sequence number).
+diff --git a/man/atoprc.5 b/man/atoprc.5
+index 43daf1a..c23c771 100644
--- a/man/atoprc.5
+++ b/man/atoprc.5
-@@ -235,7 +235,7 @@ daemon. In this directory, the daemon cr
+@@ -235,7 +235,7 @@ daemon. In this directory, the daemon creates a subdirectory
.B pacct_shadow.d
in which files will be written containing the process accounting records.
The default topdirectory is
Reply to: