From d753067d6122070c0ce165e81578966f11e67f74 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sat, 8 May 2004 01:26:23 +0000 Subject: [PATCH] optimized buffersizes git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1542 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/lib/getvserverbyctx-compat.hc | 2 +- util-vserver/lib/getvserverctx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util-vserver/lib/getvserverbyctx-compat.hc b/util-vserver/lib/getvserverbyctx-compat.hc index 9dcd49a..c1e7198 100644 --- a/util-vserver/lib/getvserverbyctx-compat.hc +++ b/util-vserver/lib/getvserverbyctx-compat.hc @@ -37,7 +37,7 @@ vc_getVserverByCtx_compat(xid_t ctx, vcCfgStyle *style, char const *revdir) vcCfgStyle cur_style = vcCFG_NONE; size_t l = strlen(revdir); size_t l1; - char path[l + sizeof(unsigned int)*3 + 2 + sizeof("/name")]; + char path[l + sizeof(unsigned int)*3 + 3]; strcpy(path, revdir); path[l] = '/'; diff --git a/util-vserver/lib/getvserverctx.c b/util-vserver/lib/getvserverctx.c index b565e4e..5334a5c 100644 --- a/util-vserver/lib/getvserverctx.c +++ b/util-vserver/lib/getvserverctx.c @@ -64,7 +64,7 @@ xid_t vc_getVserverCtx(char const *id, vcCfgStyle style, bool honor_static, bool *is_running) { size_t l1 = strlen(id); - char buf[sizeof(CONFDIR "//") + l1 + sizeof("/run")]; + char buf[sizeof(CONFDIR "//") + l1 + sizeof("/context")]; if (style==vcCFG_NONE || style==vcCFG_AUTO) style = vc_getVserverCfgStyle(id); -- 1.8.1.5