From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0r.migadu.com with LMTPS id mPnEHI8ufGCuIQAALuJCtg (envelope-from ) for ; Sun, 18 Apr 2021 15:05:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sL9uF48ufGDWHwAAB5/wlQ (envelope-from ) for ; Sun, 18 Apr 2021 13:05:19 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BBF2E1719F for ; Sun, 18 Apr 2021 15:05:18 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0D0BB26870; Sun, 18 Apr 2021 09:05:14 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 000831F9D5 for ; Sun, 18 Apr 2021 09:05:10 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id DB5F05FA96; Sun, 18 Apr 2021 09:05:10 -0400 (EDT) Received: (nullmailer pid 1213298 invoked by uid 1000); Sun, 18 Apr 2021 13:05:09 -0000 From: David Bremner To: Gregor Zattler , notmuch Subject: Re: [PATCH] lib/n_d_index_file: check return value from _n_m_add_filename In-Reply-To: <20210320131052.2254248-1-david@tethera.net> References: <20210318012509.1121007-1-david@tethera.net> <20210320131052.2254248-1-david@tethera.net> Date: Sun, 18 Apr 2021 10:05:09 -0300 Message-ID: <87lf9fbv5m.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: PFLHIGUKTG3VKMHSHKHUTDYH5FISAQAC X-Message-ID-Hash: PFLHIGUKTG3VKMHSHKHUTDYH5FISAQAC X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618751118; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=rP6FXtQzgQ78q0R0hH6PDZxHKmCak2HMJqv85aSAuRU=; b=DhCT8Lgl/1fPz+wd+dtdjwrWMJNu8/DvjXRpybb68ZDG0DLod3rPwPGZiX6GnBX1NiJLZ9 vuLQ9Pyeg2t7vAtpOKTliUTCxlG7We5VJtgJQsmbX/yU3pdvLwRwLfSB7cP0nktIA8BvF4 ZDNFqIMJGOJhJ4XB+zI2DwvLozBXirkTNGH8r8WKoNxGnhRbd+/lX0mVTQjBFf1ptK5iPD gkxB0FIxJnt5s+TYQSTuudbwz8QH/276ykko35DDpLz9YkX6gbx16I8oP1s+WucvYbszGw gR1wVnjVvuYusFNhz5fOqgBrqC8m8bZEXYpJeqbTw0xmhgdoWtTJRJo47//3vg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618751118; a=rsa-sha256; cv=none; b=LXZqc5MvnfWc6akKN6WWmlheTxaYh2jrf89uTFCzTWbEf0TSn+jZXj7wQba5YphqSC8cTG 2YsMsnFBTZUvXAo6wdHIASmONKHxNh3IYyJvR4gtXMnsJD3yqzChquUfD7TiQWXGMsNVum RRimwQjZ8uplWPiMOgZdLcG/wsVWluooqSvDX3lh9c3MbQZc+wfo4QvzVIzJPp+mL1hfCX KdJ8btk0+tsKyV4zuDTZH1wPGn0bc4SDUxKo6xTAEkGK0A0WC+b5CEMtRkRXMeI/VPgmxn pF3WUJOiEP6OIbDorqAWzWWme4YOCs2xlxaxjtgIAmlxI8rEAE68/i4CbqDu3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.98 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: BBF2E1719F X-Spam-Score: -1.98 X-Migadu-Scanner: scn0.migadu.com X-TUID: EQxe3+C6Si4U David Bremner writes: > Ignoring this return value seems like a bad idea in general, and in > particular it has been hiding one or more bugs related to handling > long directory names. > --- > > This is not a fix for the aforementioned bugs, but it at least makes > clear part of the problem. The XDDIRENTRYnnnnn: terms are not checked > for length in the same way as XDIRECTORY terms. It isn't clear the > same hashing strategy will work, as the XDDIRECTORY terms are used to > create lists of child directories. It may be the best we can do is > enforce a limit on the length of path elements in trees indexed by > notmuch. Applied to master. d