Skip to contentSkip to conversation

r5531 made x509 certs not loadable [PATCH]

Qemu-devel Henrik Holst 1 participant 1 message Nov 14, 2008

lore
Share & tools
lore
#0 lore raw
Quoted 11 lines

2008/11/12 Henrik Holst <address@hidden>:

Quoted 9 lines

The patch in r5531 which replaced a bunch of strncpy with pstrcpy causes the x509 credentials from the -vnc parameter to be one character shorter than entered meaning that there is currently no way to enter x509 certificates...

The attached patch fixes this. Also the path[len]='\0' is unnecessary now that pstrcpy is used. The problem was that the previous strncpy was called correctly which the r5531 patch didn't think. And due to how the code is a memcpy could probably be used instead...

Quoted 5 lines

Thanks for spotting. I made it a qemu_strndup instead because that's basically what's being implemented here (to be exact it could be a memdup() here because the length is already known). Please test.

Cheers

Works like a charm!

/Henrik Holst
Witsbits AB