diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 49a78121e..1c0843ea5 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.85 - =================================== + Check for sprintf error when creating path for dm control node. When buffer for dm_get_library_version() is too small, return error code. Always reinitialize _name_mangling_mode in dm_lib_init(). Add tracking flag about implicitly added devices into dm_tree. diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c index 7b1fead8a..25f1d90e9 100644 --- a/libdm/ioctl/libdm-iface.c +++ b/libdm/ioctl/libdm-iface.c @@ -380,7 +380,8 @@ static int _open_control(void) if (!_uname()) return 0; - snprintf(control, sizeof(control), "%s/%s", dm_dir(), DM_CONTROL_NODE); + if (dm_snprintf(control, sizeof(control), "%s/%s", dm_dir(), DM_CONTROL_NODE) < 0) + goto_bad; /* * Prior to 2.6.36 the minor number should be looked up in /proc.