Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValentin Ciocoi2013-08-19 14:49:58 +0000
committerMike Rennie2013-08-19 14:49:58 +0000
commit254b1f9da2073a6be0a0d38bc0925b49c53259c0 (patch)
treed762e9f935d2006fdb1e903615dc3e0723eccba2 /org.eclipse.debug.ui
parent7fe19353404e07f9c99627049b4ff92e4812161e (diff)
downloadeclipse.platform.debug-254b1f9da2073a6be0a0d38bc0925b49c53259c0.tar.gz
eclipse.platform.debug-254b1f9da2073a6be0a0d38bc0925b49c53259c0.tar.xz
eclipse.platform.debug-254b1f9da2073a6be0a0d38bc0925b49c53259c0.zip
Bug 414994 - Guard against out of bounds exception when handling escaped
characters in DefaultLabelProvider Signed-off-by: Valentin Ciocoi <valentin.ciocoi@freescale.com>
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
index 7a80d996a..b0c876923 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640)
+ * Valentin Ciocoi - Bug 414994 Guard against out of bounds exception when handling escaped characters in DefaultLabelProvider
*******************************************************************************/
package org.eclipse.debug.internal.ui;
@@ -564,7 +565,7 @@ public class DefaultLabelProvider implements ILabelProvider {
}
for (int i = 0; i < string.length(); i++) {
char c = string.charAt(i);
- if (c == '\\') {
+ if (c == '\\' && (i + 1 < string.length())) {
switch (string.charAt(i+1)) {
case 'b':
c= '\b';

Back to the top