mirror of
git://sourceware.org/git/lvm2.git
synced 2024-11-05 06:54:26 +03:00
libdm: fail if buffer for version is to short
Return fail error code, if supplied buffer is too small.
This commit is contained in:
parent
f0003d3be5
commit
583fbdba84
@ -1,5 +1,6 @@
|
||||
Version 1.02.85 -
|
||||
===================================
|
||||
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.
|
||||
Stop timeout thread immediately when the last worker thread is finished.
|
||||
|
@ -203,8 +203,7 @@ static void _build_dev_path(char *buffer, size_t len, const char *dev_name)
|
||||
|
||||
int dm_get_library_version(char *version, size_t size)
|
||||
{
|
||||
strncpy(version, DM_LIB_VERSION, size);
|
||||
return 1;
|
||||
return dm_strncpy(version, DM_LIB_VERSION, size);
|
||||
}
|
||||
|
||||
void inc_suspended(void)
|
||||
|
Loading…
Reference in New Issue
Block a user