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:
parent
59c49e108a
commit
162d88ca85
3 changed files with 7 additions and 1 deletions
1
THANKS
1
THANKS
|
@ -38,6 +38,7 @@ Bug reports and fixes from:
|
|||
Christian Lynbech
|
||||
Russ McManus
|
||||
Eric Moore
|
||||
Brad Knotwell
|
||||
Nicolas Neuss
|
||||
Thien-Thi Nguyen
|
||||
James Dean Palmer
|
||||
|
|
|
@ -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>
|
||||
|
||||
* gh.h (gh_vector_to_list): Bugfix. (Thanks to Frank Cieslok.)
|
||||
|
|
|
@ -481,7 +481,7 @@ fport_write (SCM port, void *data, size_t size)
|
|||
int space = pt->write_end - pt->write_pos;
|
||||
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;
|
||||
size -= write_len;
|
||||
input += write_len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue