From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 5C5021FAF3 for ; Wed, 16 Nov 2022 09:26:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1668590807; bh=VR23664dfOVAnjl44l+LZiqlkPFIq5cWNT16+sVcmME=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cR0Vj+fb86dujC6HE4KVtaBsWxUd7VVVcfKz83kmybuL744h/L56JhW1YQkuXEOYD W/RPzkLdkiVh5fahVBSqzHqpTs1J0BgxTPjMpJvv7tocJ3FIMu0Cb638ekbpkok7Ph iayzUMtzGXJmASM28gTXEHN4kKkXD8Sh2/zjvdM4= From: Eric Wong To: mwrap-perl@80x24.org Subject: [PATCH 4/6] fix under-allocated kbuf size Date: Wed, 16 Nov 2022 09:26:44 +0000 Message-Id: <20221116092646.19919-5-e@80x24.org> In-Reply-To: <20221116092646.19919-1-e@80x24.org> References: <20221116092646.19919-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: kbuf is always `struct src_loc', not `struct alloc_hdr'. Fortunately, nobody really needs PATH_MAX size for pathnames, so this wasn't a problem in practice. --- mwrap_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mwrap_core.h b/mwrap_core.h index d9396e6..3abc3dd 100644 --- a/mwrap_core.h +++ b/mwrap_core.h @@ -179,7 +179,7 @@ struct alloc_hdr { /* $PATHNAME:$LINENO */ static MWRAP_TSD char kbuf[ - PATH_MAX + sizeof(":") + UINT2STR_MAX + sizeof(struct alloc_hdr) + sizeof(struct src_loc) + PATH_MAX + sizeof(":") + UINT2STR_MAX ]; static struct alloc_hdr *ptr2hdr(void *p)