From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <9front-bounces@9front.inri.net> X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from 9front.inri.net (9front.inri.net [168.235.81.73]) by inbox.vuxu.org (Postfix) with ESMTP id 33F4B24C2E for ; Tue, 23 Jan 2024 19:33:51 +0100 (CET) Received: from mail-lj1-f173.google.com ([209.85.208.173]) by 9front; Tue Jan 23 13:32:07 -0500 2024 Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2cddb0ee311so49722901fa.0 for <9front@9front.org>; Tue, 23 Jan 2024 10:32:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706034724; x=1706639524; darn=9front.org; h=content-transfer-encoding:in-reply-to:from:references:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=1lIauwt60GpRMooNiovhxKbd3mqfRtQk6SMIPBnS8ec=; b=VznjtnWKVbK5uUH5ttzN5pbJL5ozAAyXZJV0UhjlNr6cujeWYMznqGBcFxT0Bz/Wvm VZwFTCuoBquvJjjTxp0GF9bDdIuifVF6V0Hx3wGL5Tf6wqc2krilXA79+2snVsYCUvZA RHECr4YMU7rjyUQg7bK+015wY0VMNAv3y9jAifazr4oNgojB8oeddYkTZ8xZDY4Q6l3b kAQW7yRdZFkvZ0ycHJIorMUul5MjTwYSCWcIrgELSlelxT8/kGjbvUttS0SgmX3BECGK ajGkpslyTBQzb6NPVYYuj/vSl8pwwrR7KUKagrlTjUc+jVpoCRW6xfHBLyAXZxfuWUIr etPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706034724; x=1706639524; h=content-transfer-encoding:in-reply-to:from:references:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=1lIauwt60GpRMooNiovhxKbd3mqfRtQk6SMIPBnS8ec=; b=XOD+EM3zLuzDq6ld66BurVl+rVhlTWIa2Ntozhbuch/cixZjOCuXjfCIeX2PCKzZRB EAWioLY+3kppZqofkEUjXxx4JA5toxBdp7rxC1oeBF3aC6WvJA1qO1taZySHnCdTDc5d XWEvdlg9G9cUMxuRfyBjqY3phHTcOjDbNR1IOLTEfxSeijtSmRGifJXvCuzp+GzngI6J zt9x5sAWP6Lwm2jdlb/AnO7tiG7zK65+pEbS7snNKBoxE1uLqWA6jusVOTdEKPGr+SP/ ixKcFBHjM1SF1/Bc1AO+SOe4o5l3B/bAmpZ5iH+X/vwP5YC0ZFF1zFK5jqEqqRND10D3 3CMw== X-Gm-Message-State: AOJu0Yykyyyxqfo+dtcZJ8sa18wQGXmitUNc/1K9GWxw5G9Xdmf3dAgi /o9oxJw27QnIBeCji51q+G/WrPCoOxKcg812Q0Tz8b0pprCp50I2DlWKTcms8AY= X-Google-Smtp-Source: AGHT+IFN/G6KLa/SRglPaN6eV06VrMX9BN2UxGmMIMbuJwqldd4CSC9yKjFdPnhrVmJVwrbcsJDxDw== X-Received: by 2002:a05:651c:221e:b0:2ce:708:ae47 with SMTP id y30-20020a05651c221e00b002ce0708ae47mr83458ljq.159.1706034724030; Tue, 23 Jan 2024 10:32:04 -0800 (PST) Received: from ?IPV6:2001:14ba:6843:2700:30e6:5800:f87:bcab? (dqbbwrybt85pyyd8j3w1t-3.rev.dnainternet.fi. [2001:14ba:6843:2700:30e6:5800:f87:bcab]) by smtp.gmail.com with ESMTPSA id q17-20020a2e9151000000b002cd187bb0f1sm3858804ljg.49.2024.01.23.10.32.03 for <9front@9front.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Jan 2024 10:32:03 -0800 (PST) Message-ID: <71eb82f2-3818-4b0c-b4cc-d9976c1b6c2f@gmail.com> Date: Tue, 23 Jan 2024 20:32:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: 9front@9front.org References: From: Kristo In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: ActivityPub cache table hardware Subject: Re: [9front] [PATCH] awk: don't write an extra NUL past the end of a block Reply-To: 9front@9front.org Precedence: bulk On 23.1.2024 18.53, Jacob Moody wrote: > Maybe give onetrueawk a try and see if you can reproduce the > crash there as well, and if not perhaps we should copy their fix. Not sure why I didn't realize to do this while debugging, indeed their fix seems to be to allocate one more byte few lines above. if ((fields = (char *) malloc(n+2)) == NULL) /* possibly 2 final \0s */ https://github.com/onetrueawk/awk/blob/master/lib.c#L394 I'm in favor of copying their fix as I can't say that I have a super deep understanding of awk's internals. Kristo