From 000cbe01e85c34f0434d87b49eff8af0d69e59de Mon Sep 17 00:00:00 2001 From: hoenicke Date: Tue, 13 Sep 2005 08:25:59 +0000 Subject: [PATCH] Check for NullPointer in SyntheticAnalyzer. Based on patch suggessted by Peter Klauser (klp at users.sf.net). git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1393 379699f6-c40d-0410-875b-85095c16579e --- jode/ChangeLog | 9 +++++++++ jode/src/net/sf/jode/jvm/SyntheticAnalyzer.java | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/jode/ChangeLog b/jode/ChangeLog index 2566d31..265ef85 100644 --- a/jode/ChangeLog +++ b/jode/ChangeLog @@ -1,3 +1,12 @@ +2005-09-13 Jochen Hoenicke + + Check for NullPointer in SyntheticAnalyzer. Based on + patch suggessted by Peter Klauser (klp at users.sf.net). + + * src/net/sf/jode/jvm/SyntheticAnalyzer.java: + (checkStaticAccess): Check refField for null pointer. + (checkAccess): Likewise. + 2004-08-06 Jochen Hoenicke * src/net/sf/jode/bytecode/BinaryInfo.java (ACC_*): added diff --git a/jode/src/net/sf/jode/jvm/SyntheticAnalyzer.java b/jode/src/net/sf/jode/jvm/SyntheticAnalyzer.java index 74ecacc..5ac72e4 100644 --- a/jode/src/net/sf/jode/jvm/SyntheticAnalyzer.java +++ b/jode/src/net/sf/jode/jvm/SyntheticAnalyzer.java @@ -231,7 +231,8 @@ public class SyntheticAnalyzer implements Opcodes { } FieldInfo refField = refClazz.findField(ref.getName(), ref.getType()); - if ((refField.getModifiers() & modifierMask) != 0) + if (refField == null + || (refField.getModifiers() & modifierMask) != 0) return false; if (!iter.hasNext()) return false; @@ -274,7 +275,8 @@ public class SyntheticAnalyzer implements Opcodes { } FieldInfo refField = refClazz.findField(ref.getName(), ref.getType()); - if ((refField.getModifiers() & modifierMask) != 0) + if (refField == null + || (refField.getModifiers() & modifierMask) != 0) return false; if (dupSeen) { if (!iter.hasNext())