sawfish/src/fonts.c: xlfd_get_element() writes 1 byte beyond allocated memory
- From: Victor Snezhko <snezhko indorsoft ru>
- To: sawfish-list gnome org
- Subject: sawfish/src/fonts.c: xlfd_get_element() writes 1 byte beyond allocated memory
- Date: Tue, 07 Feb 2006 01:40:57 +0600
Hello!
Please commit the following patch against the current fonts.c:
--- sawfish/src/fonts.c.orig Tue Feb 7 00:15:27 2006
+++ sawfish/src/fonts.c Tue Feb 7 00:15:37 2006
@@ -131,7 +131,7 @@
if (end == 0)
end = p + strlen (p);
len = end - (p + 1);
- buf = malloc (len);
+ buf = malloc (len + 1);
memcpy (buf, p + 1, len);
buf[len] = 0;
return buf;
FreeBSD project is "responsible" for unhiding this bug: they have
malloc debugging temporary enabled by default in -current.
--
WBR, Victor V. Snezhko
EMail: snezhko indorsoft ru
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]