1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

* strports.c (st_write): use memcpy, not strncpy. thanks to

Dale P. Smith.
This commit is contained in:
Gary Houston 2001-07-11 17:37:53 +00:00
parent 4ffdd2663a
commit 4b8ec61962
2 changed files with 6 additions and 1 deletions

View 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> 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
* alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c, * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,

View file

@ -155,7 +155,7 @@ st_write (SCM port, const void *data, size_t size)
int space = pt->write_end - pt->write_pos; int space = pt->write_end - pt->write_pos;
int write_len = (size > space) ? space : size; 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; pt->write_pos += write_len;
size -= write_len; size -= write_len;
input += write_len; input += write_len;