lkml.org 
[lkml]   [2009]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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    [W:0.024 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site