From: Aleš Křenek Date: Mon, 1 Aug 2005 12:18:52 +0000 (+0000) Subject: fix malloc bug X-Git-Tag: glite-lb-client-interface_R_2_0_0~5 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=1cc9d888862ec4aab9310dcfc318480ac26af968;p=jra1mw.git fix malloc bug --- 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; }