User: james
Date: 06/07/12 01:40:20
Modified: xemacs/src ChangeLog sound.c
Log:
Fix a dangerous strcpy by ensuring that the target string is exactly big
enough to hold the data. <m3irm9ywg0.fsf(a)jerrypc.cs.usu.edu>
Revision Changes Path
1.987 +5 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.986
retrieving revision 1.987
diff -u -p -r1.986 -r1.987
--- ChangeLog 2006/07/08 16:15:54 1.986
+++ ChangeLog 2006/07/11 23:40:15 1.987
@@ -1,3 +1,8 @@
+2006-07-07 Jerry James <james(a)xemacs.org>
+
+ * sound.c (init_native_sound): Make the target of a strcpy be
+ exactly the right size to hold the copied string.
+
2006-07-08 Aidan Kehoe <kehoea(a)parhasard.net>
* lisp.h:
1.27 +1 -1 XEmacs/xemacs/src/sound.c
Index: sound.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/sound.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- sound.c 2006/03/27 17:40:59 1.26
+++ sound.c 2006/07/11 23:40:17 1.27
@@ -640,7 +640,7 @@ init_native_sound (struct device *d)
DEVICE_ON_CONSOLE_P (d) = 0;
else
{
- Extbyte hn [255];
+ Extbyte *hn = alloca_array (Extbyte, strlen (h->h_name) + 1);
struct hostent *l;
strcpy (hn, h->h_name);
l = gethostbyname (localname);