From bbb2643bdcc8fb3d7f29c11e1344286b042535bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 7 May 2008 18:06:56 +0200 Subject: Use proper string functions in place of sn?printf. Instead of calling sprintf or snprintf with a "%s" format string, use the proper strcpy, strncpy, strdup or strndup function. --- src/input/vcd/xineplug_inp_vcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/input/vcd') diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index d024c5bff..f4f823918 100644 --- a/src/input/vcd/xineplug_inp_vcd.c +++ b/src/input/vcd/xineplug_inp_vcd.c @@ -272,11 +272,9 @@ vcd_add_mrl_slot(vcd_input_class_t *this, const char *mrl, off_t size, this->mrls[*i]->type = mrl_vcd; this->mrls[*i]->size = size * M2F2_SECTOR_SIZE; - this->mrls[*i]->mrl = (char *) malloc(strlen(mrl) + 1); + this->mrls[*i]->mrl = strdup(mrl); if (NULL==this->mrls[*i]->mrl) { LOG_ERR("Can't malloc %zu bytes for MRL name %s", sizeof(xine_mrl_t), mrl); - } else { - sprintf(this->mrls[*i]->mrl, "%s", mrl); } (*i)++; } -- cgit v1.2.3