]> sourceware.org Git - debugedit.git/commit
debugedit: Fix off-by-one adding DW_FORM_string replacement slashes.
authorMark Wielaard <mark@klomp.org>
Tue, 21 Mar 2017 15:57:44 +0000 (16:57 +0100)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 22 Mar 2017 12:54:18 +0000 (14:54 +0200)
commit7cf9e4d240863f7aeaba222e87718b70cd1c2c09
treea5662d7a3e636b13ee850b022d7d7087d46430d7
parent03c3eee8d3d4e6c1cfdcc2fbac2c4fac79c95c76
debugedit: Fix off-by-one adding DW_FORM_string replacement slashes.

We would put one too many slashes in between the new dest_dir and file name
part of the replacement of a DW_FORM_string in the .debug_info. If there
was file part then we would overwrite the first character of the name. If
there was no file part at all then this would overwrite the zero terminator
and cause a crash reading the rest of the data.

A crash did happen while building the docker package on fedora s390x.
https://bugzilla.redhat.com/show_bug.cgi?id=1434347

The reason neither issue would normally trigger is because if we do detect
that the dest_dir is larger than the base_dir we refuse to replace anything.

Signed-off-by: Mark Wielaard <mark@klomp.org>
tools/debugedit.c
This page took 0.022428 seconds and 5 git commands to generate.