diff options
author | Salvatore Culcasi | 2012-05-14 04:47:54 +0000 |
---|---|---|
committer | Marc-Andre Laperle | 2012-05-14 04:47:54 +0000 |
commit | 4a5e1d6fe199a896d5816614e70cdcd4c1efd575 (patch) | |
tree | de3f85166177100c2befd2aeff81dcdb508ccb03 | |
parent | c253299b8f50e24d5ab08a85374266917e145e25 (diff) | |
download | org.eclipse.cdt-4a5e1d6fe199a896d5816614e70cdcd4c1efd575.tar.gz org.eclipse.cdt-4a5e1d6fe199a896d5816614e70cdcd4c1efd575.tar.xz org.eclipse.cdt-4a5e1d6fe199a896d5816614e70cdcd4c1efd575.zip |
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 1914774515b..032f14b8d6d 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; } |