mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Never try to test character past given buffer
In case units[0] would be already '\0', do not check units[1].
This commit is contained in:
parent
5e4f234918
commit
172c87f7ca
@ -1,5 +1,6 @@
|
||||
Version 2.02.92 -
|
||||
====================================
|
||||
Properly test buffer for unit check in units_to_bytes().
|
||||
Add configure --with-systemdsystemunitdir.
|
||||
Add check for allocation failure in _build_matcher().
|
||||
Add check for rimage name allocation failure in _raid_add_images().
|
||||
|
@ -60,7 +60,7 @@ uint64_t units_to_bytes(const char *units, char *unit_type)
|
||||
v = 1;
|
||||
|
||||
/* Only one units char permitted. */
|
||||
if (*(units + 1))
|
||||
if (units[0] && units[1])
|
||||
return 0;
|
||||
|
||||
if (v == 1)
|
||||
|
Loading…
Reference in New Issue
Block a user