1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +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:
Zdenek Kabelac 2014-04-04 21:43:57 +02:00
parent f0003d3be5
commit 583fbdba84
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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)