diff options
author | Alain Magloire | 2005-03-02 21:03:45 +0000 |
---|---|---|
committer | Alain Magloire | 2005-03-02 21:03:45 +0000 |
commit | 93d962853b5209aa04befbddc4cff5d85f5dfb70 (patch) | |
tree | b3956106bc363cd3d335698463661c9445dde901 | |
parent | 38b442ab4b6b7e8ad7e3a999c1ce4560934a9221 (diff) | |
download | org.eclipse.cdt-93d962853b5209aa04befbddc4cff5d85f5dfb70.tar.gz org.eclipse.cdt-93d962853b5209aa04befbddc4cff5d85f5dfb70.tar.xz org.eclipse.cdt-93d962853b5209aa04befbddc4cff5d85f5dfb70.zip |
2005-03-02 Alain Magloire
Fix for PR 85043: NPE when calling Ar.isARHeader(null);
* utils/org/eclipse/cdt/utils/elf/AR.java
* utils/org/eclipse/cdt/utils/macho/AR.java
* utils/org/elcipse/cdt/utils/som/AR.java
* utils/org/eclipse/cdt/utils/xcoff/AR.java
5 files changed, 11 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog index 53b2d95b4dc..cc1f258cd57 100644 --- a/core/org.eclipse.cdt.core/ChangeLog +++ b/core/org.eclipse.cdt.core/ChangeLog @@ -1,3 +1,10 @@ +2005-03-02 Alain Magloire + Fix for PR 85043: NPE when calling Ar.isARHeader(null); + * utils/org/eclipse/cdt/utils/elf/AR.java + * utils/org/eclipse/cdt/utils/macho/AR.java + * utils/org/elcipse/cdt/utils/som/AR.java + * utils/org/eclipse/cdt/utils/xcoff/AR.java + 2005-02-16 Alain Magloire Fix for PR 85625, The IBinary info were not remove in the cache. * model/org/eclipse/cdt/internal/core/model/DeltaProcessor.java diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java index fbaf34e4c89..d841422414a 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java @@ -214,7 +214,7 @@ public class AR { } public static boolean isARHeader(byte[] ident) { - if (ident.length < 7 + if (ident == null || ident.length < 7 || ident[0] != '!' || ident[1] != '<' || ident[2] != 'a' diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/AR.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/AR.java index 256f4ade40c..93e8f7ea6e1 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/AR.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/AR.java @@ -215,7 +215,7 @@ public class AR { } public static boolean isARHeader(byte[] ident) { - if (ident.length < 7 + if (ident == null || ident.length < 7 || ident[0] != '!' || ident[1] != '<' || ident[2] != 'a' diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/AR.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/AR.java index 75fa09aac3a..7a7f326b57e 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/AR.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/AR.java @@ -214,7 +214,7 @@ public class AR { } public static boolean isARHeader(byte[] ident) { - if (ident.length < 8 + if (ident == null || ident.length < 8 || ident[0] != '!' || ident[1] != '<' || ident[2] != 'a' diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/AR.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/AR.java index 81412837e6a..9ae33796ebc 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/AR.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/AR.java @@ -121,7 +121,7 @@ public class AR { } public static boolean isARHeader(byte[] ident) { - if (ident.length < 8 + if (ident == null || ident.length < 8 || ident[0] != '<' || ident[1] != 'b' || ident[2] != 'i' |