* strports.c (st_write): use memcpy, not strncpy. thanks to
authorGary Houston <ghouston@arglist.com>
Wed, 11 Jul 2001 17:37:53 +0000 (17:37 +0000)
committerGary Houston <ghouston@arglist.com>
Wed, 11 Jul 2001 17:37:53 +0000 (17:37 +0000)
Dale P. Smith.

libguile/ChangeLog
libguile/strports.c

index 1295030..0ec0783 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-11  Gary Houston  <ghouston@arglist.com>
+
+       * strports.c (st_write): use memcpy, not strncpy.  thanks to
+       Dale P. Smith.
+
 2001-07-09  Thien-Thi Nguyen  <ttn@revel.glug.org>
 
        * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
index 66fc7b5..969d2b7 100644 (file)
@@ -155,7 +155,7 @@ st_write (SCM port, const void *data, size_t size)
       int space = pt->write_end - pt->write_pos;
       int write_len = (size > space) ? space : size;
       
-      strncpy ((char *) pt->write_pos, input, write_len);
+      memcpy ((char *) pt->write_pos, input, write_len);
       pt->write_pos += write_len;
       size -= write_len;
       input += write_len;