maint: mbsalign: fix an edge case where we truncate too much
authorPádraig Brady <P@draigBrady.com>
Fri, 19 Mar 2010 21:40:05 +0000 (21:40 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 19 Mar 2010 21:40:05 +0000 (21:40 +0000)
commitc872a1d8a51617c2ec76423da6f76ef2208f30d9
tree379df526baf20883e9497bfe574ec9b051d48c88
parentdfe0d336a00940c8e13c24b6d5d7485a2d7310b0
maint: mbsalign: fix an edge case where we truncate too much

* gl/lib/mbsalign.c (mbsalign): Ensure the temporary destination buffer
is big enough, as it may need to be bigger than the source buffer
in the presence of single byte non printable chars.
* gl/tests/test-mbsalign.c (main): Add a test to trigger the issue.
gl/lib/mbsalign.c
gl/tests/test-mbsalign.c