[pve-devel] [PATCH storage] fix use of uninitialized value in parse_ceph_config
David Limbeck
d.limbeck at proxmox.com
Thu Jan 3 09:34:53 CET 2019
On 1/3/19 9:26 AM, Wolfgang Bumiller wrote:
> On Wed, Jan 02, 2019 at 12:17:35PM +0100, David Limbeck wrote:
>> Signed-off-by: David Limbeck <d.limbeck at proxmox.com>
>> ---
>> PVE/CephConfig.pm | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/PVE/CephConfig.pm b/PVE/CephConfig.pm
>> index 5b2d19e..3f06242 100644
>> --- a/PVE/CephConfig.pm
>> +++ b/PVE/CephConfig.pm
>> @@ -15,6 +15,7 @@ sub parse_ceph_config {
>>
>> my $cfg = {};
>>
>> + $raw = '' if !defined($raw);
> Since we're then effectively parsing an empty string, this could just
> return the empty $cfg from above directly, no?
Yes it could return $cfg immediately. Will send a v2.
>
>> my @lines = split /\n/, $raw;
>>
>> my $section;
>> --
>> 2.11.0
More information about the pve-devel
mailing list