* ports.c (scm_port_mode): Changed `mode' array size to 4,
authorMartin Grabmüller <mgrabmue@cs.tu-berlin.de>
Tue, 13 Mar 2001 08:02:02 +0000 (08:02 +0000)
committerMartin Grabmüller <mgrabmue@cs.tu-berlin.de>
Tue, 13 Mar 2001 08:02:02 +0000 (08:02 +0000)
avoiding buffer overflow.

libguile/ChangeLog
libguile/ports.c

index 8371560..fac10cb 100644 (file)
@@ -1,3 +1,7 @@
+2001-03-13  Martin Grabmueller  <mgrabmue@cs.tu-berlin.de>
+
+       * ports.c (scm_port_mode): Changed `mode' array size to 4.
+
 2001-03-12  Keisuke Nishida  <kxn30@po.cwru.edu>
 
        * strports.c (scm_object_to_string): New procedure.
index e8c739b..e18dff0 100644 (file)
@@ -609,7 +609,7 @@ SCM_DEFINE (scm_port_mode, "port-mode", 1, 0, 0,
            "port creation are not retained.")
 #define FUNC_NAME s_scm_port_mode
 {
-  char modes[3];
+  char modes[4];
   modes[0] = '\0';
 
   port = SCM_COERCE_OUTPORT (port);