commit | 2f99788e8f41fbcf5202395707c969aecff64149 | [log] [tgz] |
---|---|---|
author | Mike Frysinger <vapier@gentoo.org> | Sun May 05 01:21:54 2013 -0400 |
committer | Dmitry V. Levin <ldv@altlinux.org> | Sun May 05 08:15:24 2013 +0000 |
tree | 397fae1310133af32815f263924ecca2d91a0f44 | |
parent | 7a498be266b80b7fef70fe74deed269ae3881525 [diff] |
mtd: clamp ubi name strings Since the length fields with the ubi volnames are signed 16bit values, make sure we clamp that number to the size of the buffer we've allocated on the stack to prevent buffer overflows. * mtd.c (ubi_ioctl): Clamp length to string_quote to 0/UBI_MAX_VOLUME_NAME. Check the return of string_quote and tweak the output accordingly.