From patchwork Thu Jul 22 12:29:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Wielaard X-Patchwork-Id: 45839 From: mark@klomp.org (Mark Wielaard) Date: Thu, 22 Jul 2021 14:29:01 +0200 Subject: [Bug debuginfod/28034] %-escape url characters In-Reply-To: References: Message-ID: <67181ab24c7a1904b07a50db7d3d6b46425203fa.camel@klomp.org> 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: Pushed this version. Thanks, Mark 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 = "/buildid"; - if (filename)/* must start with / */ + if (filename) /* must start with / */ { /* PR28034 escape characters in completed url to %hh format. */ char *escaped_string; escaped_string = curl_easy_escape(data[i].handle, filename, 0); if (!escaped_string) { - rc = ENOMEM; + rc = -ENOMEM; goto out1; } snprintf(data[i].url, PATH_MAX, "%s%s/%s/%s%s", server_url,