1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

libdm: init char array

When non-root uses dm_check_version() it's been printing some unit
values from stack. So always init those vars.
This commit is contained in:
Zdenek Kabelac 2014-10-31 13:04:46 +01:00
parent e09ee21fd4
commit ed2a0560ad
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.91 -
====================================
Don't print uninitialized stack bytes when non-root uses dm_check_version().
Fix selection criteria to not match reserved values when using >, <, >=, <.
Add DM_LIST_HEAD_INIT macro to libdevmapper.h
Fix dm_is_dm_major to not issue error about missing /proc lines for dm module.

View File

@ -544,7 +544,7 @@ static int _check_version(char *version, size_t size, int log_suppress)
*/
int dm_check_version(void)
{
char libversion[64], dmversion[64];
char libversion[64] = "", dmversion[64] = "";
const char *compat = "";
if (_version_checked)