From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gGQEIXC5kGJ3jAAAbAwnHQ (envelope-from ) for ; Fri, 27 May 2022 13:43:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AFsWIHC5kGLbNgEAG6o9tA (envelope-from ) for ; Fri, 27 May 2022 13:43:44 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3F1F314EA9 for ; Fri, 27 May 2022 13:43:44 +0200 (CEST) Received: from localhost ([::1]:39044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuYNb-0006EY-67 for larch@yhetil.org; Fri, 27 May 2022 07:43:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuYM9-0006Cg-AY for guix-patches@gnu.org; Fri, 27 May 2022 07:42:14 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39051) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuYL0-00037k-Cu for guix-patches@gnu.org; Fri, 27 May 2022 07:42:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nuYL0-0005w8-AI for guix-patches@gnu.org; Fri, 27 May 2022 07:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55673] [PATCH] cache: Catch valid integer for 'last-expiry-cleanup'. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 May 2022 11:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55673 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 55673@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 55673-submit@debbugs.gnu.org id=B55673.165365163322772 (code B ref 55673); Fri, 27 May 2022 11:41:02 +0000 Received: (at 55673) by debbugs.gnu.org; 27 May 2022 11:40:33 +0000 Received: from localhost ([127.0.0.1]:32944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuYKX-0005vE-0g for submit@debbugs.gnu.org; Fri, 27 May 2022 07:40:33 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:36466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuYKU-0005v4-Pg for 55673@debbugs.gnu.org; Fri, 27 May 2022 07:40:31 -0400 Received: from [172.20.10.5] ([188.188.253.34]) by baptiste.telenet-ops.be with bizsmtp id bngU270040lHqdo01ngUvn; Fri, 27 May 2022 13:40:29 +0200 Message-ID: <0bafbbcf501fc13b9dab096bf03ce7e60afe1c4f.camel@telenet.be> From: Maxime Devos Date: Fri, 27 May 2022 13:40:23 +0200 In-Reply-To: References: <20220527082519.501697-1-zimon.toutoune@gmail.com> <9432b1161007faacc0bd0e58da0bf839e2e8ec39.camel@telenet.be> <22ddd5b3d9906b84b0f1ca79dc78964e59345a6d.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-rE8zyxFy+1Jaj53eUyQR" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1653651629; bh=KaVCoeNxMRG6cVrieEyU3q0K9f1qzJIYe+7tHpVbkfg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=K3DIfMkMbN2Doxz+CO89wS+JfdgNMXKnF2PCU8f5wL6DjwwrBpVzf2XDebDfRh7iu /q8C++QNjNbisJ7+JxAQx39ITdMMLhYhSkozTLk5lkqeopN4hHxDf7knjQaxRYNk8C +N7hcSv6bRJWjTMI/NsGSZMRSICu5+FwM9Wmcwpr9KQx8reLppwRnoHgsUKDMriOWe X/x0/lvVh697I3z40VGduT6NP65CFv3aH9WS5VjGxBfUrhGao3bj2XSCT9aWu/V11F T78iHw+GT6hGSUMhhjWdLzTi5hW6kxexRrx7xrR0ouH5B/Eas42Epql0n5pZaZPpFM koaDbiQagUJ9Q== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653651824; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=KaVCoeNxMRG6cVrieEyU3q0K9f1qzJIYe+7tHpVbkfg=; b=jPepi00BRPRFT9Qyk+plDx7SkfXe/N686LIFJpy3lx9TDL9uNb/sTRRfK3fF4uGwmYPsDN qeCf5FGBMiIlqQOAeehctCIF9+05AZYaQ6mdyKuFOzLeg4eNXLYLb21b0aYelft2BW4VJ0 eYXv5dxLlkHj0t+NL9+x97U+EWXMaS8/q5fpKPpcEGSX42xF6kP5SdI9af6BcjygiVULWm VGKT2qUn6QI1dn54hZ3CltldaJqnBbPRNmNwI0jIrCRaawQZ/5YxT/56mnpHM3IEKzseR+ CnDx1CeypOYvO7y86qd2gTLCAccKbdr9PEbbYKf6qYJIpHaedOVCqeDFTk5iwQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653651824; a=rsa-sha256; cv=none; b=g9P+StUcm3Nl1RZhsRp130h8GT+rnJ7hOI3iP2qvQqKN7ZHcj8EJmG8sT1GrGDGyPfaHKa yJYnt5TJguHmXGbHQHzvi24h71o2ADpNoCJ6a7Xh8czjib/7kicGvfv8Mze2T5+AWL4Oph MlWmajZV6Z5N++n1n7KyApjt6hL3+pG56RglYFenhhJLxLuL553Cy8l5TvuyMFBJWp4K+9 EBt/bpJFHP5LiTpFOliQa+EhEQMr9n04Z0kZJSXEXzFGmBRekPA6Vz0oQ3kuGZJwaDbzsY ve4pYmtk2Afw2kukZq+p2n4lRFuropQpoiDnsmkVS91L1Edv9O0Q2apXWO5ksw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=K3DIfMkM; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.95 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=K3DIfMkM; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3F1F314EA9 X-Spam-Score: 2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: G1a3E7JMoOnj --=-rE8zyxFy+1Jaj53eUyQR Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable zimoun schreef op vr 27-05-2022 om 13:24 [+0200]: > On Fri, 27 May 2022 at 13:17, Maxime Devos wrote= : >=20 > > scheme@(guile-user)> (call-with-input-file "." read) > > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > > In procedure fport_read: Is een map >=20 > Euh, you are overengineering, no? We are talking about an internal > file used by the Guix cache. Yes, if the user tweaks this cache, then > bad things can happen. It is true for almost what lives in > ~/.cache/guix. Probably yes. Maybe it makes more sense when applied to get-string-all + string->number in a limited form: (or (string->number (catch 'system-error (lambda () (call-with-input-file [...] get-string-all)) (lambda arglist (if (=3D ENOENT (system-error-errno arglist)) "0" ; file does not exist (apply throw arglist))))) 0) Though even then there remain potential problems, try scheme@(guile-user)> (string->number "#e1e1000") ice-9/boot-9.scm:1669:16: In procedure raise-exception: In procedure string->number: Value out of range: 1000 (seems unlikely to encounter such corruption in practice though). Greetings, MAxime. --=-rE8zyxFy+1Jaj53eUyQR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYpC4pxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kjUAQCJLEmo38K+tLP+UCxxOjaUPHmK 7XpeSjxAW7yPCkl1PgEAq0BTdH3PVeTVIKJJul5JX4gUpCkmuHiv17TeSn0iegc= =pLaM -----END PGP SIGNATURE----- --=-rE8zyxFy+1Jaj53eUyQR--