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
..
2009-06-16 19:50:13 -07:00
2009-06-17 11:06:25 +01:00
2009-06-16 19:50:13 -07:00
2009-06-17 09:35:24 -07:00
2009-06-16 19:50:13 -07:00
2009-06-16 19:50:13 -07:00
2009-06-18 13:04:04 -07:00
2009-06-17 14:04:42 -07:00
2009-06-16 19:50:13 -07:00
2009-06-18 13:04:04 -07:00
2009-06-15 16:47:25 +10:00
2009-06-18 13:03:43 -07:00
2009-06-16 19:50:13 -07:00
2009-06-18 13:04:04 -07:00
2009-06-18 13:04:04 -07:00