]> git.baikalelectronics.ru Git - kernel.git/commit
nls: utf8_wcstombs: fix buffer overflow
authorClemens Ladisch <clemens@ladisch.de>
Fri, 24 Apr 2009 08:11:56 +0000 (10:11 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Jun 2009 04:44:43 +0000 (21:44 -0700)
commit3f019ed5850cda9d322aebdbed8d8673af0de39f
treea4844dac7cd7bbce34ab33295eaa402d996e9b48
parent29494e10b4b65791a02b78c68954e993b5d947f3
nls: utf8_wcstombs: fix buffer overflow

utf8_wcstombs forgot to include one-byte UTF-8 characters when
calculating the output buffer size, i.e., theoretically, it was possible
to overflow the output buffer with an input string that contains enough
ASCII characters.

In practice, this was no problem because the only user so far (VFAT)
always uses a big enough output buffer.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nls/nls_base.c