summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2010-09-12 20:38:47 +0000
committerphintuka <phintuka>2010-09-12 20:38:47 +0000
commit14dc5a827083c966986f4f5c6a4174e0bcf0696b (patch)
treed98ea45090cfa42b028f8b6a15fcd678ac404fb3
parent554a02ca2c8b9aa9bdd7f9954b8c120bb65816ab (diff)
downloadxineliboutput-14dc5a827083c966986f4f5c6a4174e0bcf0696b.tar.gz
xineliboutput-14dc5a827083c966986f4f5c6a4174e0bcf0696b.tar.bz2
strcpy -> memmove. Strings passed to strcpy may not overlap.
(Thanks to Michal Novotny, patch #3057840)
-rw-r--r--menu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index 2a691d3f..0d2cd3c3 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c,v 1.77 2010-02-18 21:36:36 phintuka Exp $
+ * $Id: menu.c,v 1.78 2010-09-12 20:38:47 phintuka Exp $
*
*/
@@ -324,7 +324,7 @@ eOSState cMenuBrowseFiles::Open(bool ForceOpen, bool Queue, bool Rewind)
char *buffer = NULL;
if (asprintf(&buffer, "%s/%s", m_CurrentDir, d) >= 0) {
while (buffer[0] == '/' && buffer[1] == '/')
- strcpy(buffer, buffer+1);
+ memmove(buffer, buffer+1, strlen(buffer));
free(m_CurrentDir);
m_CurrentDir = buffer;
}