From 1cc9d888862ec4aab9310dcfc318480ac26af968 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Mon, 1 Aug 2005 12:18:52 +0000 Subject: [PATCH] fix malloc bug --- org.glite.jp.primary/src/authz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.glite.jp.primary/src/authz.c b/org.glite.jp.primary/src/authz.c index 8ff2b58..edaaef4 100644 --- a/org.glite.jp.primary/src/authz.c +++ b/org.glite.jp.primary/src/authz.c @@ -68,7 +68,7 @@ int glite_jpps_readauth(glite_jp_context_t ctx,const char *file) return glite_jp_stack_error(ctx,&err); } - ctx->trusted_peers = realloc(ctx->trusted_peers, (cnt+1) * sizeof *ctx->trusted_peers); + ctx->trusted_peers = realloc(ctx->trusted_peers, (cnt+2) * sizeof *ctx->trusted_peers); ctx->trusted_peers[cnt++] = strdup(buf); ctx->trusted_peers[cnt] = NULL; } -- 1.8.2.3