mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
Xml_node: fix bug in Xml_node::decoded_content
Previously, the dst_len value was not decreased after each character that was written to the dst buffer. This way, if the content length was greater than dst_len, decoded_content wrote to memory out of bounds. Issue #2644
This commit is contained in:
parent
84e476facb
commit
26f65f4996
@ -683,7 +683,7 @@ class Genode::Xml_node
|
||||
char const *src = content_base();
|
||||
size_t src_len = content_size();
|
||||
|
||||
for (; dst_len && src_len; result_len++) {
|
||||
for (; dst_len && src_len; dst_len--, result_len++) {
|
||||
|
||||
Decoded_character const decoded_character(src, src_len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user