linux-stable/drivers/staging/rt2860
Anders Kaseorg 32c976bca4 Staging: rt2860: Don't call sprintf() with overlapping input and output.
The use of sprintf() to append to a buffer, as in
  sprintf(buf, "%sEntry: %d\n", buf, i)
is not valid according to C99 ("If copying takes place between objects
that overlap, the behavior is undefined.").  It breaks at least in
userspace under gcc -D_FORTIFY_SOURCE.  Replace this construct with
  sprintf(buf + strlen(buf), "Entry: %d\n", i)

This patch was automatically generated using
  perl -0pe 's/(sprintf\s*\(\s*([^,]*))(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3$4/g'
  perl -0pe 's/(snprintf\s*\(\s*([^,]*))(\s*,[^,]*?)(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3 - strlen($2)$4$5/g'

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:36 -07:00
..
common Staging: rt2860: Don't call sprintf() with overlapping input and output. 2009-06-19 11:00:36 -07:00
sta Staging: rt2860: Don't call sprintf() with overlapping input and output. 2009-06-19 11:00:36 -07:00
2860_main_dev.c Staging: rt2860: Ported v1.7.1.1 changes into v1.8.0.0, becoming v1.8.1.1 2009-04-03 14:53:31 -07:00
aironet.h
ap.h
chlist.h
config.mk Staging: rt2860: Remove dependency on CFLAG RT2860 2009-04-03 14:53:31 -07:00
dfs.h
Kconfig
leap.h
link_list.h
Makefile Staging: rt2860: Remove dependency on CFLAG RT2860 2009-04-03 14:53:31 -07:00
md4.h
md5.h
mlme.h
oid.h Staging: rt2860: Ported v1.7.1.1 changes into v1.8.0.0, becoming v1.8.1.1 2009-04-03 14:53:31 -07:00
rt28xx.h Staging: rt2860: Remove dependency on CFLAG RT2860 2009-04-03 14:53:31 -07:00
rt2860.h Staging: rt2860: Ported v1.7.1.1 changes into v1.8.0.0, becoming v1.8.1.1 2009-04-03 14:53:31 -07:00
rt_ate.c Staging: rt2860: Remove dependency on CFLAG RT2860 2009-04-03 14:53:31 -07:00
rt_ate.h Staging: rt2860: Remove dependency on CFLAG RT2860 2009-04-03 14:53:31 -07:00
rt_config.h Staging: rt2860: Remove dependency on CFLAG RT2860 2009-04-03 14:53:31 -07:00
rt_linux.c Staging: rt2860: Remove dependency on CFLAG RT2860 2009-04-03 14:53:31 -07:00
rt_linux.h Staging: rt2860: Remove dependency on CFLAG RT2860 2009-04-03 14:53:31 -07:00
rt_main_dev.c Staging: rt2860: convert to netdev_ops 2009-04-17 11:06:24 -07:00
rt_profile.c Staging: rt2860: Ported v1.7.1.1 changes into v1.8.0.0, becoming v1.8.1.1 2009-04-03 14:53:31 -07:00
rtmp.h Staging: rt2860: Remove dependency on CFLAG RT2860 2009-04-03 14:53:31 -07:00
rtmp_ckipmic.h
rtmp_def.h Staging: rt2860: Remove dependency on CFLAG RT2860 2009-04-03 14:53:31 -07:00
rtmp_type.h
spectrum.h
spectrum_def.h
sta_ioctl.c Staging: rt2860: Don't call sprintf() with overlapping input and output. 2009-06-19 11:00:36 -07:00
TODO staging: document that the wifi staging drivers a bit better 2009-04-03 14:54:27 -07:00
wpa.h Staging: rt2860: Ported v1.7.1.1 changes into v1.8.0.0, becoming v1.8.1.1 2009-04-03 14:53:31 -07:00