From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 55A89383941F for ; Thu, 22 Jul 2021 12:29:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 55A89383941F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 0D6EE300066F; Thu, 22 Jul 2021 14:29:02 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id BAD5A44E35B2; Thu, 22 Jul 2021 14:29:01 +0200 (CEST) Message-ID: <67181ab24c7a1904b07a50db7d3d6b46425203fa.camel@klomp.org> Subject: Re: [Bug debuginfod/28034] %-escape url characters From: Mark Wielaard To: Noah Sanci , elfutils-devel@sourceware.org Date: Thu, 22 Jul 2021 14:29:01 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2021 12:29:04 -0000 Hi Noah, On Wed, 2021-07-21 at 15:44 -0400, Noah Sanci via Elfutils-devel wrote: > Here is a quick error fix. Thanks, looks good. Failure results should indeed be negative. For the record the actual fix was: diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.= c index 64936acd..26ba1891 100644 --- a/debuginfod/debuginfod-client.c +++ b/debuginfod/debuginfod-client.c @@ -831,14 +831,14 @@ debuginfod_query_server (debuginfod_client *c, else slashbuildid =3D "/buildid"; =20 - if (filename)/* must start with / */ + if (filename) /* must start with / */ { /* PR28034 escape characters in completed url to %hh format. */ char *escaped_string; escaped_string =3D curl_easy_escape(data[i].handle, filename, 0)= ; if (!escaped_string) { - rc =3D ENOMEM; + rc =3D -ENOMEM; goto out1; } snprintf(data[i].url, PATH_MAX, "%s%s/%s/%s%s", server_url, Pushed this version. Thanks, Mark