[OpenWrt-Devel] [PATCH] uci: do not access invalid memory when updating an existing section
Yousong Zhou
yszhou4tech at gmail.com
Mon Aug 13 22:52:33 EDT 2018
On Tue, 14 Aug 2018 at 04:56, Enrico Mioso <mrkiko.rs at gmail.com> wrote:
>
> Hello, and thank you for your help, and review.
> I agree on not changing behaviour. the problem is not actually a memory leak, but the fact that ptr->s->options seems to not be a valid pointer at that point.
> At least, this is what valgrind suggested, if I am not wrong or interpreting wrongly the output.
>
realloc(ptr->s) won't invalidate ptr->s->options. That must happened
somewhere else before. By the way, commit with relevant valgrind logs
recorded can be helpful.
Regards,
yousong
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list