Re: [libvirt] [PATCH 1/3] conf: Properly truncate wide character names in virDomainObjGetShortName

2017-08-25 Thread John Ferlan
On 08/25/2017 02:30 AM, Martin Kletzander wrote: > On Wed, Aug 23, 2017 at 04:47:03PM -0400, John Ferlan wrote: >> >> >> On 08/23/2017 07:47 AM, Martin Kletzander wrote: >>> We always truncated the name at 20 bytes instead of characters. In >>> case 20 bytes were in the middle of a multi-byte

Re: [libvirt] [PATCH 1/3] conf: Properly truncate wide character names in virDomainObjGetShortName

2017-08-25 Thread Martin Kletzander
On Fri, Aug 25, 2017 at 08:30:52AM +0200, Martin Kletzander wrote: On Wed, Aug 23, 2017 at 04:47:03PM -0400, John Ferlan wrote: On 08/23/2017 07:47 AM, Martin Kletzander wrote: We always truncated the name at 20 bytes instead of characters. In case 20 bytes were in the middle of a

Re: [libvirt] [PATCH 1/3] conf: Properly truncate wide character names in virDomainObjGetShortName

2017-08-25 Thread Martin Kletzander
On Wed, Aug 23, 2017 at 04:47:03PM -0400, John Ferlan wrote: On 08/23/2017 07:47 AM, Martin Kletzander wrote: We always truncated the name at 20 bytes instead of characters. In case 20 bytes were in the middle of a multi-byte character, then the string became invalid and various parts of the

Re: [libvirt] [PATCH 1/3] conf: Properly truncate wide character names in virDomainObjGetShortName

2017-08-23 Thread John Ferlan
On 08/23/2017 07:47 AM, Martin Kletzander wrote: > We always truncated the name at 20 bytes instead of characters. In > case 20 bytes were in the middle of a multi-byte character, then the > string became invalid and various parts of the code would error > out (e.g. XML parsing of that string).

[libvirt] [PATCH 1/3] conf: Properly truncate wide character names in virDomainObjGetShortName

2017-08-23 Thread Martin Kletzander
We always truncated the name at 20 bytes instead of characters. In case 20 bytes were in the middle of a multi-byte character, then the string became invalid and various parts of the code would error out (e.g. XML parsing of that string). Let's instead properly truncate it after 20 characters