svn commit: [25782] trunk/busybox/shell

vda at busybox.net vda at busybox.net
Sat Mar 21 21:51:11 UTC 2009


Author: vda
Date: 2009-03-21 21:51:11 +0000 (Sat, 21 Mar 2009)
New Revision: 25782

Log:
hush: fix strcpy of potentially overlapping strings



Modified:
   trunk/busybox/shell/hush.c


Changeset:
Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c	2009-03-21 21:15:54 UTC (rev 25781)
+++ trunk/busybox/shell/hush.c	2009-03-21 21:51:11 UTC (rev 25782)
@@ -2801,7 +2801,7 @@
 		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 @@
 			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;
 }



More information about the busybox-cvs mailing list