From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 43ED66DE15F4 for ; Wed, 15 Mar 2017 18:16:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.005 X-Spam-Level: X-Spam-Status: No, score=-0.005 tagged_above=-999 required=5 tests=[AWL=0.006, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aeickmx3NBRL for ; Wed, 15 Mar 2017 18:16:31 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 007566DE15DD for ; Wed, 15 Mar 2017 18:16:30 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1coK13-00060x-6s; Wed, 15 Mar 2017 21:15:45 -0400 Received: (nullmailer pid 17406 invoked by uid 1000); Thu, 16 Mar 2017 01:16:25 -0000 From: David Bremner To: Johannes Schauer , notmuch@notmuchmail.org Subject: Re: [PATCH 2/2] lib: clamp return value of g_mime_utils_header_decode_date to >=0 In-Reply-To: <20170312125101.21656-2-david@tethera.net> References: <20150422065630.6330.90536@hoothoot> <20170312125101.21656-1-david@tethera.net> <20170312125101.21656-2-david@tethera.net> Date: Wed, 15 Mar 2017 22:16:25 -0300 Message-ID: <87bmt2m36e.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 01:16:32 -0000 David Bremner writes: > For reasons not completely understood at this time, gmime (as of > 2.6.22) is returning a date before 1900 on bad date input. Since this > confuses some other software, we clamp such dates to 0, > i.e. 1970-01-01. series pushed, amended per Tomi's suggestion. It's possible I've been writing an unhealthy amount of scheme lately. Dunno what else would make the ternary if operator look sensible. d