Skip to content
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

parseKMLCoordinatesAndAttributes can fail #1018

Open
tohidemyname opened this issue Nov 17, 2023 · 0 comments
Open

parseKMLCoordinatesAndAttributes can fail #1018

tohidemyname opened this issue Nov 17, 2023 · 0 comments

Comments

@tohidemyname
Copy link
Contributor

I just read a NTS commit:
NetTopologySuite/NetTopologySuite@d0dde92

The modified code is as follows:
else if (attributeNames.Contains(elementName))
{
if (attributes == null)
{
attributes = new Dictionary<string, string>();
}

                    attributes.Add(elementName, xmlStreamReader.ReadElementContentAsString());
                }
                else
                {
                    xmlStreamReader.Skip();
                }

The JTS code is as follows:

          else if (attributeNames.contains(elementName)) {
                if (attributes == null) {
                    attributes = new HashMap<>();
                }

                attributes.put(elementName, xmlStreamReader.getElementText());
            }

It does not handle the else condition. However, airbreather does not mention how to trigger this bug. He can give more feedback on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant