[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [BUG, RFC] block/vmdk.c: File name with space fails to
From: |
Philipp Hahn |
Subject: |
Re: [Qemu-devel] [BUG, RFC] block/vmdk.c: File name with space fails to open |
Date: |
Tue, 29 Jan 2013 22:47:55 +0100 |
User-agent: |
KMail/1.9.10 (enterprise35 20100903.1171286) |
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 mention "max width" for "%[", but it
> > works with Debian/GNU Linux Squeeze.
>
> It's fine according to my reading of C89.
Thank you for lloking this up.
> I'm afraid your patch is flawed. For
>
> RW 1048576 FLAT ""test-f001.vmdk"" 0
You seem to assume " is allowed in the file name, I've assumed that " is not
allowed, since we don't know the quoting rules for vmdk files, if there are
any.
That's why I checked our old VMware workstation, which refused to create
volumes containing !#%^&*><:;'"<>/?
Should we print a warning or error out if a " is detected?
> fname is now "test-f001.vmdk" instead of "\"test-f001.vmdk\"". That's
> because you change sscanf() to ignore the double-quotes without dropping
> the quote stripping code below.
I'll remove the stripping code.
> Care to post a fixed up patch?
Will do so.
Sincerely
Philipp
--
Philipp Hahn Open Source Software Engineer address@hidden
Univention GmbH be open. fon: +49 421 22 232- 0
Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99
http://www.univention.de/
signature.asc
Description: This is a digitally signed message part.