File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
soot-infoflow/src/soot/jimple/infoflow/problems Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -318,17 +318,19 @@ else if (defStmt.getRightOp() instanceof LengthExpr) {
318318 targetType = TypeUtils .buildArrayOrAddDimension (targetType ,
319319 arrayRef .getType ().getArrayType ());
320320 } else if (leftValue instanceof ArrayRef ) {
321- assert source .getAccessPath ().getBaseType () instanceof ArrayType ;
322- targetType = ((ArrayType ) targetType ).getElementType ();
323-
324321 // If we have a type of java.lang.Object, we try
325322 // to tighten it
326323 if (TypeUtils .isObjectLikeType (targetType ))
327324 targetType = rightValue .getType ();
325+ else if (targetType instanceof ArrayType )
326+ targetType = ((ArrayType ) targetType ).getElementType ();
327+ else
328+ targetType = null ;
328329
329330 // If the types do not match, the right side
330331 // cannot be an alias
331- if (!manager .getTypeUtils ().checkCast (rightValue .getType (), targetType ))
332+ if (targetType != null
333+ && !manager .getTypeUtils ().checkCast (rightValue .getType (), targetType ))
332334 addRightValue = false ;
333335 }
334336 }
You can’t perform that action at this time.
0 commit comments