kernel-fxtec-pro1x/fs/fscache
Arnd Bergmann ebfddb3d44 fscache: fix fscache_objlist_show format processing
gcc points out a minor bug in the handling of unknown cookie types,
which could result in a string overflow when the integer is copied into
a 3-byte string:

  fs/fscache/object-list.c: In function 'fscache_objlist_show':
  fs/fscache/object-list.c:265:19: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=]
   sprintf(_type, "%02u", cookie->def->type);
                  ^~~~~~
  fs/fscache/object-list.c:265:4: note: 'sprintf' output between 3 and 4 bytes into a destination of size 3

This is currently harmless as no code sets a type other than 0 or 1, but
it makes sense to use snprintf() here to avoid overflowing the array if
that changes.

Link: http://lkml.kernel.org/r/20170714120720.906842-22-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-09-13 18:53:15 -07:00
..
cache.c
cookie.c fscache: Clear outstanding writes when disabling a cookie 2017-01-31 13:23:09 -05:00
fsdef.c
histogram.c
internal.h
Kconfig
main.c
Makefile
netfs.c FS-Cache: Initialise stores_lock in netfs cookie 2017-01-31 13:23:09 -05:00
object-list.c fscache: fix fscache_objlist_show format processing 2017-09-13 18:53:15 -07:00
object.c fscache: Fix dead object requeue 2017-01-31 13:23:09 -05:00
operation.c
page.c mm: remove nr_pages argument from pagevec_lookup{,_range}() 2017-09-06 17:27:27 -07:00
proc.c
stats.c