pr22895
authorMatthias Klose <doko@debian.org>
Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)
committerMatthias Klose <doko@debian.org>
Fri, 22 Jun 2018 06:11:21 +0000 (07:11 +0100)
commitc0db8cb567d7f5b71150c0b5bb875c32124bd7ae
tree4cdf9d7afa884954e5bbc3b9c74269f2b19a1fd7
parent16eb5911c5a708baf3f3c44bf7a33c59f8a9d434
pr22895

# DP: Catch integer overflows/underflows when parsing corrupt DWARF FORM blocks.

From 12c963421d045a127c413a0722062b9932c50aa9 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Wed, 28 Feb 2018 11:50:49 +0000
Subject: [PATCH] Catch integer overflows/underflows when parsing corrupt DWARF
 FORM blocks.

PR 22895
PR 22893
* dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
pointer.  Drop unused abfd parameter.  Check the size of the block
before initialising the data field.  Return the end pointer if the
size is invalid.
(read_attribute_value): Adjust invocations of read_n_bytes.

Gbp-Pq: Name pr22895.diff
bfd/dwarf2.c