lkml.org 
[lkml]   [2009]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateSun, 01 Mar 2009 23:56:39 +0100
FromRoel Kluin <>
Subjectlp: 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


\
 
 \ /
  Last update: 2009-03-01 23:59    [from the cache]
©2003-2010