From 3ef31b16c1ad68eaa8ceb34f38333e12b4ab8871 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 30 Mar 2011 20:51:48 +0200 Subject: package/config; br2_symbol_printer(): fix off-by-1 in string handling Based on patch by bbj17@gmx.de. Signed-off-by: Peter Korsgaard --- package/config/patches/08-make-write-deps.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'package/config/patches/08-make-write-deps.patch') diff --git a/package/config/patches/08-make-write-deps.patch b/package/config/patches/08-make-write-deps.patch index 0f9c7e308..b69daad6e 100644 --- a/package/config/patches/08-make-write-deps.patch +++ b/package/config/patches/08-make-write-deps.patch @@ -16,12 +16,12 @@ Index: config/util.c + char *ret; + if (len < 1) + return NULL; -+ ret = malloc(len); ++ ret = malloc(len+1); + if (!ret) { + printf("Out of memory!"); + exit(1); + } -+ memset(ret, 0, len); ++ memset(ret, 0, len+1); + i = j = 0; + if (strncmp("BR2_", in, 4) == 0) + i += 4; @@ -34,7 +34,7 @@ Index: config/util.c + return ret; +} + -+/* write dependencies of the infividual config-symbols */ ++/* write dependencies of the individual config-symbols */ +static int write_make_deps(const char *name) +{ + char *str; -- cgit v1.2.3