mirror of
https://github.com/adulau/aha.git
synced 2025-01-03 22:53:18 +00:00
2fefd5f668
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> |
||
---|---|---|
.. | ||
common | ||
sta | ||
2870_main_dev.c | ||
aironet.h | ||
ap.h | ||
chlist.h | ||
dfs.h | ||
Kconfig | ||
leap.h | ||
link_list.h | ||
Makefile | ||
md4.h | ||
md5.h | ||
mlme.h | ||
netif_block.h | ||
oid.h | ||
rt28xx.h | ||
rt2870.h | ||
rt_ate.c | ||
rt_ate.h | ||
rt_config.h | ||
rt_linux.c | ||
rt_linux.h | ||
rt_main_dev.c | ||
rt_profile.c | ||
rtmp.h | ||
rtmp_ckipmic.h | ||
rtmp_def.h | ||
rtmp_type.h | ||
spectrum.h | ||
spectrum_def.h | ||
sta_ioctl.c | ||
sta_ioctl.c.patch | ||
tmp60 | ||
tmp61 | ||
TODO | ||
wpa.h |