File apcupsd-largebuf-overflow.patch of Package apcupsd.import4958

--- src/reports.c
+++ src/reports.c
@@ -107,8 +107,7 @@
    avsnprintf(buf, sizeof(buf), fmt, ap);
    va_end(ap);
 
-   strncat(largebuf, buf, sizeof(largebuf));
-   largebuf[sizeof(largebuf) - 1] = 0;
+   strncat(largebuf, buf, sizeof(largebuf)-strlen(largebuf)-1);
    stat_recs++;
 }