[haiku-commits] Re: haiku: hrev53988 - src/system/kernel/vm

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 16 Mar 2020 21:23:39 -0400

On Mon, Mar 16, 2020 at 12:52 PM Adrien Destugues
<pulkomandy@xxxxxxxxxxxxx> wrote:

The source needs to be validated up to min(passed size, strlen).
Basically this means implementing the function, as there is no other way
than iterate it to find the NULL terminator, and you may as well do the
copy while you do that...

No, you only need to restrict the passed size to the valid range; no
need to actually read data (unless I missed something.)

Proposed fix: https://review.haiku-os.org/c/haiku/+/2376

-waddlesplash

Other related posts: