diff options
author | phintuka <phintuka> | 2010-09-12 20:38:47 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2010-09-12 20:38:47 +0000 |
commit | 14dc5a827083c966986f4f5c6a4174e0bcf0696b (patch) | |
tree | d98ea45090cfa42b028f8b6a15fcd678ac404fb3 | |
parent | 554a02ca2c8b9aa9bdd7f9954b8c120bb65816ab (diff) | |
download | xineliboutput-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |