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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 5A6F21F910 for ; Thu, 3 Nov 2022 04:33:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229770AbiKCEdn (ORCPT ); Thu, 3 Nov 2022 00:33:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230300AbiKCEd0 (ORCPT ); Thu, 3 Nov 2022 00:33:26 -0400 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 525CB1834D for ; Wed, 2 Nov 2022 21:32:59 -0700 (PDT) Received: (qmail 12845 invoked by uid 109); 3 Nov 2022 04:32:59 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Thu, 03 Nov 2022 04:32:59 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 14129 invoked by uid 111); 3 Nov 2022 04:33:00 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Thu, 03 Nov 2022 00:33:00 -0400 Authentication-Results: peff.net; auth=none Date: Thu, 3 Nov 2022 00:32:57 -0400 From: Jeff King To: Philippe Blain Cc: Martin Englund , git@vger.kernel.org Subject: Re: Git Bug Report: out of memory using git tag Message-ID: References: <38d50c30-c6a3-5989-6e01-47c5467d9d6b@gmail.com> <49e1eec2-0567-f75e-7d0d-0f2d00ac472c@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <49e1eec2-0567-f75e-7d0d-0f2d00ac472c@gmail.com> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Wed, Nov 02, 2022 at 08:13:27AM -0400, Philippe Blain wrote: > > [1/2]: ref-filter: fix parsing of signatures without blank lines > > [2/2]: ref-filter: fix parsing of signatures with CRLF and no body > [...] > One thing I think that is not mentioned in your commit messages is that 1/2 > would also apply to a CRLF-using tag with no blank lines, i.e. > > this is the subject^M > -----BEGIN PGP SIGNATURE-----^M > ...some stuff...^M > -----END PGP SIGNATURE-----^M > > Parsing this tag correctly is fixed by 1/2, right? Right. Because there's no blank line to find, neither the "\n\n" nor the "\r\n\r\n" strstr matches, so it is essentially the same case. The fact that the other non-blank lines are CRLF doesn't matter for this part of the code. :) > Anyway thanks again for the fixes, No problem! -Peff