summaryrefslogtreecommitdiff
path: root/src/input/vcd
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-07 18:06:56 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-07 18:06:56 +0200
commitbbb2643bdcc8fb3d7f29c11e1344286b042535bf (patch)
tree874f8a93f6afe13af796073c92a46dee774c946f /src/input/vcd
parent837822b5c6924be7fbc297bcef9639d7ada95a30 (diff)
downloadxine-lib-bbb2643bdcc8fb3d7f29c11e1344286b042535bf.tar.gz
xine-lib-bbb2643bdcc8fb3d7f29c11e1344286b042535bf.tar.bz2
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.
Diffstat (limited to 'src/input/vcd')
-rw-r--r--src/input/vcd/xineplug_inp_vcd.c4
1 files changed, 1 insertions, 3 deletions
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)++;
}