From b0bd88abfbe3f1deb8fad7c1aa71e5692fb7faf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 7 May 2008 19:54:15 +0200 Subject: Again, use asprintf() rather than malloc()+sprintf(). --- src/post/mosaico/mosaico.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/post/mosaico/mosaico.c b/src/post/mosaico/mosaico.c index 37551aba5..1222810aa 100644 --- a/src/post/mosaico/mosaico.c +++ b/src/post/mosaico/mosaico.c @@ -178,8 +178,7 @@ static post_plugin_t *mosaico_open_plugin(post_class_t *class_gen, int inputs, this->pip[i].y = 50; this->pip[i].w = 150; this->pip[i].h = 150; - this->pip[i].input_name = (char *)malloc(sizeof("video in ") + 10); - snprintf(this->pip[i].input_name, sizeof("video in ") + 10, "video in %d", i+1); + asprintf(&(this->pip[i].input_name), "video in %d", i+1); port = _x_post_intercept_video_port(&this->post, video_target[0], &input, NULL); port->new_port.close = mosaico_close; -- cgit v1.2.3