diff options
author | axel <axel@liljencrantz.se> | 2006-02-22 00:46:42 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-02-22 00:46:42 +1000 |
commit | 5aa019a0b58473f69742235d4b7a814d1d957872 (patch) | |
tree | 5452f4a9032d0e3e8de9c2fc9431fab56c6691bf /halloc_util.c | |
parent | 92aa99104a9de5fdcd09eb19bc0e403064cac18e (diff) |
Fix off-by-one error resulting in truncated output from wcsndup fallback and halloc_wcsndup
darcs-hash:20060221144642-ac50b-9dcd77238bc4bd740bbda6e15ded793fad44c363.gz
Diffstat (limited to 'halloc_util.c')
-rw-r--r-- | halloc_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/halloc_util.c b/halloc_util.c index f2eae06a..3213fd70 100644 --- a/halloc_util.c +++ b/halloc_util.c @@ -88,7 +88,7 @@ wchar_t *halloc_wcsndup( void * context, const wchar_t *in, int c ) { die_mem(); } - wcslcpy( res, in, c ); + wcslcpy( res, in, c+1 ); res[c] = L'\0'; return res; } |