projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccff0b9
)
hush: fix strcpy of potentially overlapping strings
author
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 21 Mar 2009 21:51:11 +0000
(21:51 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 21 Mar 2009 21:51:11 +0000
(21:51 -0000)
shell/hush.c
patch
|
blob
|
history
diff --git
a/shell/hush.c
b/shell/hush.c
index bfd487cfb4e4f5d0c8f588d140d52bc17c545a65..2c4704a9cde61f6b656cde4c16595b1757ee12bf 100644
(file)
--- a/
shell/hush.c
+++ b/
shell/hush.c
@@
-2801,7
+2801,7
@@
static char *expand_string_to_string(const char *str)
if (!list[0] || list[1])
bb_error_msg_and_die("BUG in varexp2");
/* actually, just move string 2*sizeof(char*) bytes back */
- strcpy((char*)list, list[0]);
+
overlapping_
strcpy((char*)list, list[0]);
debug_printf_expand("string_to_string='%s'\n", (char*)list);
return (char*)list;
}
@@
-2823,7
+2823,7
@@
static char* expand_strvec_to_string(char **argv)
n++;
}
}
- strcpy((char*)list, list[0]);
+
overlapping_
strcpy((char*)list, list[0]);
debug_printf_expand("strvec_to_string='%s'\n", (char*)list);
return (char*)list;
}