[wesnoth-commits] [wesnoth/wesnoth] f144a1: Fixed memory corruption bugs with embedded quotes
GitHub
noreply at github.com
Thu Sep 20 16:11:58 UTC 2018
Branch: refs/heads/simple_wml_double_quotes
Home: https://github.com/wesnoth/wesnoth
Commit: f144a15f3d5b202d55234d3535cac6b3c6247c67
https://github.com/wesnoth/wesnoth/commit/f144a15f3d5b202d55234d3535cac6b3c6247c67
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-09-20 (Thu, 20 Sep 2018)
Changed paths:
M src/server/simple_wml.cpp
Log Message:
-----------
Fixed memory corruption bugs with embedded quotes
node::unescape_value() could keep going beyond the value if the same WML
document contained another embedded quote in a different attribute value.
Fixed.
node::shift_buffers() still assumed that all attribute values are in the
output document (which cannot hold if the escaped value differs from the
real one). Now it detects attribute values which need escaping and
duplicates them manually.
Finally, node::output() didn't duplicate values which contain embedded
quotes. It turned out that duplicating them all is necessary, because
otherwise document::output() frees all the buffers and invalidates the
values. They are now duplicated.
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the Commits
mailing list