lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 03 Feb 2009 01:09:24 +0900
From:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:	Roel Kluin <roel.kluin@...il.com>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: msdos_format_name() bug?

Roel Kluin <roel.kluin@...il.com> writes:

> in msdos_format_name(const unsigned char *name, int len, ...)
>
> name is the proposed name, len is its length.
>
>         while (c != '.' && len--)
>                 c = *name++;
>         if (c == '.') {
>                 while (walk - res < 8)
>                         *walk++ = ' ';
>                 while (len > 0 && walk - res < MSDOS_NAME) {
>
> Is the postfix decrement in the first loop correct, or should it be
> prefix? (isn't that one character too many?)
>
> If not, note that if the proposed name ends with a dot: e.g.
> 'myfile.' the first while loop iterates until the dot which ends
> the loop, but because of the postfix decrement len already is 0,
> so the third while loop won't start. Is that correct?

In the "myfile." case, it seems correct. It will provide "MYFILE     ".
-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ