jvoisin/fortify-headers

Fix `wctomb`

Opened this issue · 0 comments

The current implementation is wrong: it's valid to pass a buffer smaller than MB_CUR_MAX to wctomb. The only thing we can do is check that the return value of wctomb is smaller than the size of the buffer.