summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Program
diff options
context:
space:
mode:
authorKevin Barnes <krbarnes>2007-03-26 14:37:37 +0000
committerKevin Barnes <krbarnes>2007-03-26 14:37:37 +0000
commit185295935f60ceed807b3151118bc827376c83f5 (patch)
tree0da6dad0a50572a54205a8c9f0edc192c8cf57f1 /bundles/org.eclipse.swt/Eclipse SWT Program
parent83bc833968e9fb1e6239faba9853b755c175a00b (diff)
downloadeclipse.platform.swt-185295935f60ceed807b3151118bc827376c83f5.tar.gz
eclipse.platform.swt-185295935f60ceed807b3151118bc827376c83f5.tar.xz
eclipse.platform.swt-185295935f60ceed807b3151118bc827376c83f5.zip
179161 - Program.findProgram(String extension) should gracefully handle long input
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Program')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/wpf/org/eclipse/swt/program/Program.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/wpf/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/wpf/org/eclipse/swt/program/Program.java
index bd4539f048..1e0190ee3a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/wpf/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/wpf/org/eclipse/swt/program/Program.java
@@ -64,6 +64,7 @@ public static Program findProgram (String extension) {
if (extension == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
if (extension.length () == 0) return null;
if (extension.charAt (0) != '.') extension = "." + extension; //$NON-NLS-1$
+ if (extension.length() > 0xff) return null;
int key = createDotNetString (extension);
int classesRoot = OS.Registry_ClassesRoot ();
int registryKey = OS.RegistryKey_OpenSubKey (classesRoot, key);