Skip to content

Fixed bug in XML read-in: reading in more than one source for a sink. #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public SerializedInfoflowResults readResults(String fileName) throws XMLStreamEx

// Read the attributes
statement = getAttributeByName(reader, XmlConstants.Attributes.statement);
method = getAttributeByName(reader, XmlConstants.Attributes.method);
} else if (reader.getLocalName().equals(XmlConstants.Tags.accessPath) && reader.isStartElement()) {
stateStack.push(State.accessPath);

Expand Down Expand Up @@ -175,18 +176,18 @@ public SerializedInfoflowResults readResults(String fileName) throws XMLStreamEx
} else if (reader.isEndElement()) {
stateStack.pop();

if (reader.getLocalName().equals(XmlConstants.Tags.accessPath))
if (reader.getLocalName().equals(XmlConstants.Tags.accessPath)) {
ap = new SerializedAccessPath(apValue, apValueType, apTaintSubFields,
apFields.toArray(new String[apFields.size()]),
apTypes.toArray(new String[apTypes.size()]));
else if (reader.getLocalName().equals(XmlConstants.Tags.sink))
} else if (reader.getLocalName().equals(XmlConstants.Tags.sink)) {
sink = new SerializedSinkInfo(ap, statement, method);
else if (reader.getLocalName().equals(XmlConstants.Tags.source))
} else if (reader.getLocalName().equals(XmlConstants.Tags.source)) {
source = new SerializedSourceInfo(ap, statement, method, pathElements);
else if (reader.getLocalName().equals(XmlConstants.Tags.result))
results.addResult(source, sink);
else if (reader.getLocalName().equals(XmlConstants.Tags.pathElement))
} else if (reader.getLocalName().equals(XmlConstants.Tags.pathElement)) {
pathElements.add(new SerializedPathElement(ap, statement, method));
}
}
}

Expand Down