Steps of reproducing the problem(var1 is name of any one uefi variable):
1、efivar --export=test --name=var1
2、efivar --import=test --print
3、efivar --print --name=var1
In step 2, the value part of the var1 would be empty ,which is different from step3.
The problem seems to be the if condition in efi_variable_get_data from export.c:
if (var->data || !var->data_size)
Step2 will work fine when fix like this:
if (!var->data || !var->data_size)
Steps of reproducing the problem(var1 is name of any one uefi variable): 1、efivar --export=test --name=var1 2、efivar --import=test --print 3、efivar --print --name=var1 In step 2, the value part of the var1 would be empty ,which is different from step3. The problem seems to be the if condition in efi_variable_get_data from export.c: if (var->data || !var->data_size) Step2 will work fine when fix like this: if (!var->data || !var->data_size)