sprintf can overflow the fixed length title which is char[32]. This patch change title to dynamically allocated char array using asprintf or strdup. If one of them fail we leave returning NULL to indicate the failure. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Tested-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Signed-off-by: Daniel Stone <daniels@collabora.com>dev
parent
0f1cac54af
commit
5c2f20edb0
Loading…
Reference in new issue