public inbox for
 help / color / mirror / Atom feed
From: Aaron Merey <>
Cc: Aaron Merey <>
Subject: [PATCH OB] debuginfod-client: Fix out-of-bounds write
Date: Tue,  1 Nov 2022 19:55:59 -0400	[thread overview]
Message-ID: <> (raw)

Pushed as obvious.

Return early from path_escape when '\0' is seen in order to prevent
an out-of-bounds write to the dest buffer.

Signed-off-by: Aaron Merey <>
 debuginfod/debuginfod-client.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index d097ca49..0c4a00cf 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
@@ -595,8 +595,7 @@ path_escape (const char *src, char *dest)
       case '\0':
         dest[q] = '\0';
-        q = PATH_MAX-1; /* escape for loop too */
-        break;
+	return;
       case '/': /* escape / to prevent dir escape */

                 reply	other threads:[~2022-11-01 23:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).