]> git.ipfire.org Git - thirdparty/valgrind.git/commit
vgdb.c (fork_and_exec_valgrind): Fix off-by-one error write
authorMark Wielaard <mark@klomp.org>
Tue, 12 Nov 2024 12:23:03 +0000 (13:23 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 12 Nov 2024 12:29:41 +0000 (13:29 +0100)
commitf4fe5faf3d0f45b3824bbb9070232682df52a582
treee9a837d704275e657d8aea0a1775737c30b6048a
parentbc9daa9cd15aeee69a1180268e1a132d5574d8cd
vgdb.c (fork_and_exec_valgrind): Fix off-by-one error write

commit 646978d9adc5 ("vgdb: Handle EINTR and EAGAIN more
consistently") introduced an off-by-one issue trying to write back the
error from child to parent.

Instead of +1 it should have been +written (which initially is zero).

This is in an "should never happen" path, so hopefully didn't really
cause issues. But if it did happen the parent would have gotten the
wrong error code.
coregrind/vgdb.c