diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-01-15 06:57:16 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-01-15 06:57:16 -0800 |
commit | 8ea9cc713f52fd0a1357aa5cded97ceb234b669a (patch) | |
tree | b9df438b259d9197637ac500cf42386855226fa0 /share | |
parent | d1b4bb2bc9448424284d5994fcd25ebacc65b17b (diff) | |
download | txr-8ea9cc713f52fd0a1357aa5cded97ceb234b669a.tar.gz txr-8ea9cc713f52fd0a1357aa5cded97ceb234b669a.tar.bz2 txr-8ea9cc713f52fd0a1357aa5cded97ceb234b669a.zip |
ffi: bugfix: char array shouldn't null terminate.
* ffi.c (ffi_char_array_put): The char array put operation
should only null terminate when the null_term flag is set;
i.e. it's a zarray type. The bug here is that when a Lisp
string of length > N is put into an (array N char), the
C array gets null terminated, which is wrong. Only in the case
when the string is exactly of length N is there no null
termination. In all cases when the length >= N, we want
truncation without null termination.
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions