diff mbox series

[Bug,debuginfod/28034] %-escape url characters

Message ID 67181ab24c7a1904b07a50db7d3d6b46425203fa.camel@klomp.org
State Committed
Headers show
Series [Bug,debuginfod/28034] %-escape url characters | expand

Commit Message

Mark Wielaard July 22, 2021, 12:29 p.m. UTC
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 mbox series

Patch

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,