Check for empty destination before NUL-terminating

This overflow was triggered in the second test of to_lowercase_utf8
where the destination is zero length (w->destlen == 0). `w->destlen`
would overflow by subtraction, then the subscript would overflow the
destination.

Signed-off-by: Laslo Hunhold <dev@frign.de>
1 file changed