-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Use SAX2 parser for GML/KML #758
Conversation
| char *colon_pos; | ||
| char *node_name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| char *colon_pos; | |
| char *node_name; | |
| const char *colon_pos; | |
| const char *node_name; |
| /* If there's a colon in the element name, */ | ||
| /* move past it before checking for equality with */ | ||
| /* the element name we are looking for */ | ||
| node_name = (char*)xn->name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| node_name = (char*)xn->name; | |
| node_name = (const char*)xn->name; |
| char *colon_pos; | ||
| char *node_name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| char *colon_pos; | |
| char *node_name; | |
| const char *colon_pos; | |
| const char *node_name; |
| /* If there's a colon in the element name, */ | ||
| /* move past it before checking for equality with */ | ||
| /* the element name we are looking for */ | ||
| node_name = (char*)xn->name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| node_name = (char*)xn->name; | |
| node_name = (const char*)xn->name; |
| @@ -88,7 +110,8 @@ Datum geom_from_kml(PG_FUNCTION_ARGS) | |||
|
|
|||
| /* Begin to Parse XML doc */ | |||
| xmlInitParser(); | |||
| xmldoc = xmlReadMemory(xml, xml_size, NULL, NULL, XML_PARSE_SAX1); | |||
| xmldoc = xmlReadMemory(xml, xml_size, NULL, NULL, 0); | |||
| // xmldoc = xmlReadMemory(xml, xml_size, NULL, NULL, XML_PARSE_SAX1); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // xmldoc = xmlReadMemory(xml, xml_size, NULL, NULL, XML_PARSE_SAX1); |
| static inline bool | ||
| is_xml_element(xmlNodePtr xn, const char *xml_name) | ||
| { | ||
| char *colon_pos, *node_name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| char *colon_pos, *node_name; | |
| const char *colon_pos; | |
| const char *node_name; |
| /* If there's a colon in the element name, */ | ||
| /* move past it before checking for equality with */ | ||
| /* the element name we are looking for */ | ||
| node_name = (char*)xn->name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| node_name = (char*)xn->name; | |
| node_name = (const char*)xn->name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback! Applied in 7038255 going forwards.
This works around a change in the SAX1 parser behaviour that came about recently in RHEL builds due to a security fix that has been widely applied.
https://gitlab.gnome.org/GNOME/libxml2/-/issues/535
https://access.redhat.com/errata/RHSA-2024:0119