diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-12-11 20:20:47 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-12-11 20:20:47 +0100 |
commit | 854d028db99d81752082028700bd7ada53306424 (patch) | |
tree | 45abbdabd5a2dd720388a94daa21a5df56ea0e4b /sys/src/cmd/cfs | |
parent | 86e63c36eded29e46a17628264b73d743df9a864 (diff) |
acme: fix buffer overrun in xfidutfread() and xfidruneread(), cleanup
the utf8 buffers b1 where allocated from fbufalloc() which gives
us BUFSIZE bytes, but Xfid->count can be bigger than that. so just
emalloc() the requested number of bytes.
when converting from Runes to utf-8, we have to account for the
terminating '\0' byte snprint() places, so fix the maxrune number
calculation instead of using BUFSIZE+1 as buffer size.
Diffstat (limited to 'sys/src/cmd/cfs')
0 files changed, 0 insertions, 0 deletions