summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-03-14 11:57:08 +0000
committerphintuka <phintuka>2007-03-14 11:57:08 +0000
commitf4dbdb5b7b6fea8eb820971ddb26c1b44f8cc205 (patch)
treedc46a528d281ee76e969600a64fb1bad7e75f65d
parenta413d1a9e2e2cfab5ae2d187bd2e792a3993dd65 (diff)
downloadxineliboutput-f4dbdb5b7b6fea8eb820971ddb26c1b44f8cc205.tar.gz
xineliboutput-f4dbdb5b7b6fea8eb820971ddb26c1b44f8cc205.tar.bz2
strcpy -> strn0cpy
-rw-r--r--media_player.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/media_player.c b/media_player.c
index 73f8d6b8..5000d814 100644
--- a/media_player.c
+++ b/media_player.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: media_player.c,v 1.21 2007-02-28 10:01:45 phintuka Exp $
+ * $Id: media_player.c,v 1.22 2007-03-14 11:57:08 phintuka Exp $
*
*/
@@ -492,6 +492,9 @@ cXinelibPlayerControl::~cXinelibPlayerControl()
void cXinelibPlayerControl::Queue(const char *file)
{
+ if(!file)
+ return;
+
m_Lock.Lock();
LOGMSG("cXinelibPlayerControl::Queue(%s)", file);
@@ -1236,7 +1239,7 @@ void cXinelibImagesControl::Seek(int Rel)
m_Player->ShowImage(m_Files[m_Index]);
m_LastShowTime = time(NULL);
- strcpy(xc.browse_images_dir, m_Files[m_Index]);
+ strn0cpy(xc.browse_images_dir, m_Files[m_Index], sizeof(xc.browse_images_dir));
}
void cXinelibImagesControl::Show(void)