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]
Message-ID: <49AB12A7.10708@gmail.com>
Date:	Sun, 01 Mar 2009 23:56:39 +0100
From:	Roel Kluin <roel.kluin@...il.com>
To:	lkml <linux-kernel@...r.kernel.org>
Subject: lp: too large subtraction on unsigned?

vi drivers/char/lp.c +705

note that count is unsigned, and we do the loop:

do {
	if (canwrite > 0) {
		...
		count -= written;
	}
	if (lf && canwrite <= 0) {
		...
		count--;
		...
	}
} while (count > 0 && (CONSOLE_LP_STRICT || written > 0));

Isn't this wrong?

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