From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11306 invoked from network); 21 Jul 2020 10:34:38 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 21 Jul 2020 10:34:38 -0000 Received: (qmail 10187 invoked by uid 550); 21 Jul 2020 10:34:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 3551 invoked from network); 21 Jul 2020 10:18:51 -0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dereferenced.org; s=default; t=1595326720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hbw1uKKxmOMxtHVmdZgAOy8JIEFfZ7gLctnnp6ateus=; b=nmeDIyzxS9zcv1z3QtROZbUeDH7Ea9iRJCCvM70PM6nr3+aKrXwPbeW00KfOtGvkN9wA08 7qlEAYaIm3Ev9Din0YiFQJYuV2rKqLl84EEMSA1fKHIBTvNO/amxEmxPx03nRevTq4TdyM ofqypA3Z51CEo749V7fXf0dGJttEJP4= From: Ariadne Conill To: musl Date: Tue, 21 Jul 2020 04:18:35 -0600 Message-ID: <3289935.7VNl89jVkd@localhost> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: [musl] perhaps we should add re[c]allocarray? Hello, reallocarray and recallocarray are BSD extensions that solve similar issues as strlcpy/strlcat, but with array reallocations instead of strings. reallocarray itself is already part of glibc since 2.28. Unfortunately, while working on new ifupdown implementation for Alpine, I wanted to use recallocarray because it is very helpful in terms of pushing new strings to a string array (you will always maintain a NULL-terminated array, and you don't have to worry about it) -- but I discovered musl still does not have it. Anyway, I think it would be useful to include both functions in musl 1.2.1. If everyone agrees, I'll make a patch. Ariadne