From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] Move check for invalid chars to vfat_valid_longname()
Date: Tue, 09 Nov 2004 17:22:42 +0100 [thread overview]
Message-ID: <4190EED2.5040906@lsrfire.ath.cx> (raw)
In-Reply-To: <87actr5ak8.fsf@devron.myhome.or.jp>
OGAWA Hirofumi wrote:
> lsr@neapel230.server4you.de writes:
>>+ /* check for invalid characters */
>>+ for (p = name; p < name + len; p++) {
>>+ if (*p < 0x0020 || strchr("*?<>|\":\\", *p) != NULL)
>>+ return 0;
>>+ }
>>+
>> return 1;
>> }
>>
>>@@ -636,10 +627,6 @@ static int vfat_build_slots(struct inode
>> if (res < 0)
>> goto out_free;
>>
>>- res = vfat_is_used_badchars(uname, ulen);
>>- if (res < 0)
>>- goto out_free;
>>-
>> res = vfat_create_shortname(dir, sbi->nls_disk, uname, ulen,
>> msdos_name, &lcase);
>> if (res < 0)
>
>
> Some encodings is using the area of ascii code as second byte.
Yes. But..
> So, it can't.
We want to make sure filenames don't contain '*', '?' etc. It doesn't
matter whether we check the VFS idea of the filename (a simple C string)
or some other encoding of it, no?
Right now we check for 0x002A after xlate_to_uni(), after the patch we
check for 0x2A (ASCII code of '*') before xlate_to_uni() etc. I just
translated the Unicode chars back to ASCII and moved the check.
Am I missing something?
Thanks,
René
next prev parent reply other threads:[~2004-11-09 16:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-09 1:30 [PATCH 0/4] VFAT cleanup Rene Scharfe
2004-11-09 1:35 ` [PATCH 1/4] Move check for invalid chars to vfat_valid_longname() lsr
2004-11-09 15:03 ` OGAWA Hirofumi
2004-11-09 16:22 ` René Scharfe [this message]
2004-11-09 17:25 ` OGAWA Hirofumi
2004-11-09 18:22 ` Rene Scharfe
2004-11-09 18:41 ` OGAWA Hirofumi
2004-11-09 1:38 ` [PATCH 2/4] Return better error codes from vfat_valid_longname() lsr
2004-11-09 15:28 ` OGAWA Hirofumi
2004-11-09 16:49 ` Rene Scharfe
2004-11-09 17:35 ` OGAWA Hirofumi
2004-11-09 18:35 ` Rene Scharfe
2004-11-09 19:08 ` OGAWA Hirofumi
2004-11-09 1:42 ` [PATCH 3/4] Simplify checks for unwanted chars lsr
2004-11-09 15:40 ` OGAWA Hirofumi
2004-11-09 1:43 ` [PATCH 4/4] Manually inline shortname_info_to_lcase() lsr
2004-11-09 15:11 ` OGAWA Hirofumi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4190EED2.5040906@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire.ath.cx \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome