From 25c84fbf7b6cae6c397313882e34e40c3c65f338 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 14 Sep 2012 21:31:25 +0000 Subject: [PATCH] Fixed potential buffer overflow --- src/makefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/makefile.c b/src/makefile.c index f62155b..9283668 100644 --- a/src/makefile.c +++ b/src/makefile.c @@ -1214,7 +1214,7 @@ static int _target_plugin(Configure * configure, FILE * fp, fputc('\n', fp); fprintf(fp, "%s%s%s%s%s%s%s%s", "\t$(CCSHARED) -o ", target, soext, " $(", target, "_OBJS) $(", target, "_LDFLAGS)"); - if((q = malloc(strlen(target) + 4)) != NULL) + if((q = malloc(strlen(target) + strlen(soext) + 1)) != NULL) { sprintf(q, "%s%s", target, soext); if((p = config_get(configure->config, q, "ldflags")) != NULL)