Re: [Qemu-devel] [BUG, RFC] block/vmdk.c: File name with space fails to open

2013-01-29 Thread Philipp Hahn
Hello, On Friday 25 January 2013 09:37:39 Markus Armbruster wrote: Suggest to include '\n' in the stop set, like \%511[^\\n]\, to better detect malformed input. Will do, also \r. I don't know how portable %[ together with a maximum width is, because the manual page for sscanf() doesn't

Re: [Qemu-devel] [BUG, RFC] block/vmdk.c: File name with space fails to open

2013-01-25 Thread Markus Armbruster
Philipp Hahn h...@univention.de writes: Hello, I tried to open a twoGbMaxExtentSparse VMDK file, which uses spaces in its own and for the referenced file names. This breaks in line 646 of block/vmdk.c because %511s stops at the first space and thus fname is incomplete: ret =

Re: [Qemu-devel] [BUG, RFC] block/vmdk.c: File name with space fails to open

2013-01-25 Thread Stefan Hajnoczi
On Thu, Jan 24, 2013 at 05:29:27PM +0100, Philipp Hahn wrote: Hello, I tried to open a twoGbMaxExtentSparse VMDK file, which uses spaces in its own and for the referenced file names. This breaks in line 646 of block/vmdk.c because %511s stops at the first space and thus fname is

[Qemu-devel] [BUG, RFC] block/vmdk.c: File name with space fails to open

2013-01-24 Thread Philipp Hahn
Hello, I tried to open a twoGbMaxExtentSparse VMDK file, which uses spaces in its own and for the referenced file names. This breaks in line 646 of block/vmdk.c because %511s stops at the first space and thus fname is incomplete: ret = sscanf(p, %10s % SCNd64 %10s %511s % SCNd64,