Implemented fix, see below:
Implemented fix, see below:

Dear all,

There appears to be a bug in the addAll method of soot.util.ArraySet. In particular, it iterates through the 'elements' array of the ArraySet being imported from but doesn't stop at the last real element (the 'elements' array contains nulls for non-existent elements):

for (Object element : as.elements)
ret = add( (E)element ) | ret;

I think it should be something like:

int asSize = as.size();
Object[] asElements = as.elements;
for (int i=0; i<asSize; i++)
ret = add( (E)asElements[i] ) | ret;

anddann/soot,plast-lab/soot,xph906/SootNew,mbenz89/soot,mbenz89/soot,xph906/SootNew,plast-lab/soot,mbenz89/soot,xph906/SootNew,anddann/soot,anddann/soot,cfallin/soot,cfallin/soot,cfallin/soot,plast-lab/soot,anddann/soot,xph906/SootNew,mbenz89/soot,cfallin/soot