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

1999-08-18 Gary Houston <ghouston@easynet.co.uk>

* fports.c (fport_write): use memcpy instead of strncpy, in case
	the data contains NUL.
This commit is contained in:
Gary Houston 1999-08-18 19:55:23 +00:00
parent 59c49e108a
commit 162d88ca85
3 changed files with 7 additions and 1 deletions

1
THANKS
View file

@ -38,6 +38,7 @@ Bug reports and fixes from:
Christian Lynbech Christian Lynbech
Russ McManus Russ McManus
Eric Moore Eric Moore
Brad Knotwell
Nicolas Neuss Nicolas Neuss
Thien-Thi Nguyen Thien-Thi Nguyen
James Dean Palmer James Dean Palmer

View file

@ -1,3 +1,8 @@
1999-08-18 Gary Houston <ghouston@easynet.co.uk>
* fports.c (fport_write): use memcpy instead of strncpy, in case
the data contains NUL.
1999-08-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> 1999-08-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
* gh.h (gh_vector_to_list): Bugfix. (Thanks to Frank Cieslok.) * gh.h (gh_vector_to_list): Bugfix. (Thanks to Frank Cieslok.)

View file

@ -481,7 +481,7 @@ fport_write (SCM port, 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 (pt->write_pos, input, write_len); memcpy (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;