changeset 36500:21d4dd6f5996

vo_bl: Deobfuscate, use strdup.
author reimar
date Sat, 18 Jan 2014 12:47:54 +0000
parents b83593ffdcfb
children d0234dff2dc4
files libvo/vo_bl.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_bl.c	Sat Jan 18 12:43:38 2014 +0000
+++ b/libvo/vo_bl.c	Sat Jan 18 12:47:54 2014 +0000
@@ -350,13 +350,12 @@
 		return 1;
 	}
 
-	bl_subdevice = malloc(strlen(arg) + 1);
+	bl_subdevice = strdup(arg);
 	if (!bl_subdevice) {
 		mp_msg(MSGT_VO, MSGL_ERR, "bl: out of memory error\n");
 		return 1;
 	}
 	p = bl_subdevice;
-	strcpy(p, arg);
 	mp_msg(MSGT_VO, MSGL_V, "bl: preinit called with %s\n", arg);
 	for (i = 0; i < NO_BLS; i++) {
 		if (!strncmp(p, bls[i].name, strlen(bls[i].name)))