public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Aleksei Vetrov <vvvvvv@google.com>
To: Mark Wielaard <mark@klomp.org>
Cc: elfutils-devel@sourceware.org, kernel-team@android.com,
	 maennich@google.com
Subject: Re: [PATCH] libdw: check memory access in get_(u|s)leb128
Date: Mon, 13 Feb 2023 20:03:49 +0000	[thread overview]
Message-ID: <CAH2MdgpWCRswjmd7fHbv0OtOQH_AvgwPf5h-qe8_gKHr=NdTVg@mail.gmail.com> (raw)
In-Reply-To: <20230211234258.GG2430@gnu.wildebeest.org>

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

Hi Mark,

On Sat, Feb 11, 2023 at 11:43 PM Mark Wielaard <mark@klomp.org> wrote:
> After this code we will do:
>
>   /* There might be one extra byte.  */
>   unsigned char b = **addrp;
>   ++*addrp;
>
> So I think we want to catch that too.  Easiest imho seems to move (and
> invert) the max check immediately after calculating max.

Thanks for finding this! Sounds good and I'm going to do this also in
uleb128 for consistency. Sending updated patch in reply.

  reply	other threads:[~2023-02-13 20:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 16:05 vvvvvv
2023-01-26 21:05 ` Mark Wielaard
2023-02-07 16:17   ` Aleksei Vetrov
2023-02-07 17:17     ` Mark Wielaard
2023-02-11 23:42 ` Mark Wielaard
2023-02-13 20:03   ` Aleksei Vetrov [this message]
2023-02-13 20:10     ` [PATCH v2] " vvvvvv
2023-02-14 15:44       ` Mark Wielaard

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to='CAH2MdgpWCRswjmd7fHbv0OtOQH_AvgwPf5h-qe8_gKHr=NdTVg@mail.gmail.com' \
    --to=vvvvvv@google.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=kernel-team@android.com \
    --cc=maennich@google.com \
    --cc=mark@klomp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).