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-prev] [day] [month] [year] [list]
Date:	Sun, 1 Mar 2009 20:41:38 -0300
From:	Thiago Galesi <thiagogalesi@...il.com>
To:	Roel Kluin <roel.kluin@...il.com>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: lp: too large subtraction on unsigned?

Doesn't look like something is wrong, or I'm missing something...
:
> do {
>        if (canwrite > 0) {
>                ...
>                count -= written;
>        }

If there are chars left you write to the PP and take it out of the total

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

The second if is for translating \n to \r\n only if you've already
written everything (up to /n) to the PP

If count > 0 fails (that is, count == 0) you get out of the loop

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