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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 02 Feb 2009 15:28:29 +0100
From:	Roel Kluin <roel.kluin@...il.com>
To:	hirofumi@...l.parknet.co.jp
CC:	lkml <linux-kernel@...r.kernel.org>
Subject: msdos_format_name() bug?

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?

Roel

--
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