[PATCH 2/2] virStorageEncryptionSecretCopy: Properly copy internals

Ján Tomko jtomko at redhat.com
Thu Mar 19 17:43:53 UTC 2020


On a Thursday in 2020, Peter Krempa wrote:
>On Thu, Mar 19, 2020 at 18:14:15 +0100, Ján Tomko wrote:
>> On a Thursday in 2020, Peter Krempa wrote:
>> > virStorageEncryptionSecretPtr may have a string inside it, thus we must
>> > copy the string too. Use virSecretLookupDefCopy to do that.
>> >
>> > Likely caused by 756b46ddd24.
>>
>> Please remove the period from the end.
>>
>> Also, at the times of that commit, memcpy was sufficient:
>> struct _virStorageEncryptionSecret {
>>     int type; /* virStorageEncryptionSecretType */
>>     unsigned char uuid[VIR_UUID_BUFLEN];
>> };
>>
>> So this actually fixes commit 47e88b33b which switched to using
>> virSecretLookupDef.
>
>Oh, okay, I didn't look as closely into the history. I'll update the
>problematic commit.
>

Well, 756b46ddd24 is also problematic - something like this is easy to
overlook.

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200319/23fe0f46/attachment-0001.sig>


More information about the libvir-list mailing list