| author | Salvatore Culcasi | 2012-05-14 00:47:54 (EDT) |
|---|---|---|
| committer | Doug Schaefer | 2012-07-11 16:55:17 (EDT) |
| commit | 273e46b4095d06fefb19cfe371a7994e727af225 (patch) (side-by-side diff) | |
| tree | dd90488802272bbedf74065916d7ed3e7e9b222f | |
| parent | 218640c008d1adafbf387c989878762efa39d497 (diff) | |
| download | org.eclipse.cdt-273e46b4095d06fefb19cfe371a7994e727af225.zip org.eclipse.cdt-273e46b4095d06fefb19cfe371a7994e727af225.tar.gz org.eclipse.cdt-273e46b4095d06fefb19cfe371a7994e727af225.tar.bz2 | |
Bug 322475 - Internal error (NegativeArraySizeException) in Dwarf
| -rw-r--r-- | core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java index 1914774..032f14b 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 QNX Software Systems and others. + * Copyright (c) 2000, 2012 QNX Software Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * QNX Software Systems - Initial API and implementation + * Salvatore Culcasi - Bug 322475 *******************************************************************************/ package org.eclipse.cdt.utils.debug.dwarf; @@ -476,7 +477,7 @@ public class Dwarf { case DwarfConstants.DW_FORM_block1 : { int size = in.get(); - byte[] bytes = new byte[size]; + byte[] bytes = new byte[size & 0xff]; in.get(bytes); obj = bytes; } @@ -485,7 +486,7 @@ public class Dwarf { case DwarfConstants.DW_FORM_block2 : { int size = read_2_bytes(in); - byte[] bytes = new byte[size]; + byte[] bytes = new byte[size & 0xffff]; in.get(bytes); obj = bytes; } |

