dcoppa 09ff635d5c Import rxvt-unicode, an enhanced version of the rxvt terminal
emulator with Unicode and Xft support.

OK giovanni@, naddy@
2010-05-03 16:35:20 +00:00

19 lines
665 B
Plaintext

$OpenBSD: patch-src_rxvtc_c,v 1.1.1.1 2010/05/03 16:35:22 dcoppa Exp $
Fix possible off-by-one buffer overflows by replacing every call of
strcpy, strcat, sprintf by respectively strlcpy, strlcat and snprintf.
-- 2010-04-16 Thomas de Grivel <billitch@gmail.com>
diff -ruN rxvt-unicode-9.07.orig/src/rxvtc.C rxvt-unicode-9.07/src/rxvtc.C
--- src/rxvtc.C.orig Sun Jun 15 15:39:43 2008
+++ src/rxvtc.C Tue Apr 27 18:13:09 2010
@@ -62,7 +62,7 @@ client::client ()
}
sa.sun_family = AF_UNIX;
- strcpy (sa.sun_path, sockname);
+ strlcpy (sa.sun_path, sockname, sizeof(sa.sun_path));
free (sockname);
if (connect (fd, (sockaddr *)&sa, sizeof (sa)))