File xsys-fix-bufferoverflowstrncat-error.patch of Package xsys
diff -Naur a/Makefile b/Makefile
--- a/Makefile 2007-07-12 18:05:05.000000000 -0500
+++ b/Makefile 2013-04-12 13:22:03.595352978 -0500
@@ -9,7 +9,7 @@
VER_MINOR = 2
VER_PATCH = 0
CC = gcc
-CFLAGS += -O2 -Wall -fPIC
+CFLAGS += $(RPM_OPT_FLAGS) -fPIC
CFLAGS += $(shell pkg-config dbus-1 --cflags) $(shell pkg-config glib-2.0 --cflags)
CFLAGS += -DVER_MINOR=$(VER_MINOR) -DVER_MAJOR=$(VER_MAJOR) -DVER_PATCH=$(VER_PATCH) \
-DVER_STRING=\"$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)\" -DPCIIDS=\"$(PCIIDS)\" $(BUTTON)
diff -Naur a/xsys.c b/xsys.c
--- a/xsys.c 2007-07-13 15:38:51.000000000 -0500
+++ b/xsys.c 2013-04-12 12:18:53.459169546 -0500
@@ -540,9 +540,9 @@
if(bytes_recv>1024)
{
bytes_recv /= 1024;
- snprintf(mag_r, 5, "KB/s");
+ snprintf(mag_r, sizeof(mag_r), "KB/s");
}
- else snprintf(mag_r, 5, "B/s");
+ else snprintf(mag_r, sizeof(mag_r), "B/s");
if(bytes_sent>1024)
{
@@ -719,7 +719,7 @@
flat_format_output("length", length, format);
else
format_output("length", length, format);
- strncat(title, length, bsize);
+ strncat(title, length, sizeof(title)-strlen(title)-1);
if ((action != 0) && (long)userdata)
xchat_printf(ph, "You are %s", title);