From ff6ab33d1a912bc0abb30c9e9f6e5232c61c1102 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Mon, 26 Feb 2007 11:53:08 +0000 Subject: [PATCH] fix bug #24088 - bad memory allocation when reading super users file --- org.glite.lb.server/src/bkserverd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.glite.lb.server/src/bkserverd.c b/org.glite.lb.server/src/bkserverd.c index 0eab69f..45e8be3 100644 --- a/org.glite.lb.server/src/bkserverd.c +++ b/org.glite.lb.server/src/bkserverd.c @@ -1387,7 +1387,7 @@ static int read_roots(const char *file) nl = strchr(buf,'\n'); if (nl) *nl = 0; - super_users = realloc(super_users, (cnt+1) * sizeof super_users[0]); + super_users = realloc(super_users, (cnt+2) * sizeof super_users[0]); super_users[cnt] = strdup(buf); super_users[++cnt] = NULL; } -- 1.8.2.3