Only when signed, a snprintf() retval below zero can be evaluated. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> --- diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 64ebfc5..25a98c1 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -394,7 +394,7 @@ static void qh_lines ( u32 hw_curr; struct list_head *entry; struct ehci_qtd *td; - unsigned temp; + int temp; unsigned size = *sizep; char *next = *nextp; char mark; @@ -459,9 +459,9 @@ static void qh_lines ( else if (size < temp) temp = size; size -= temp; - next += temp; if (temp == size) goto done; + next += temp; } temp = snprintf (next, size, "\n"); @@ -470,11 +470,10 @@ static void qh_lines ( else if (size < temp) temp = size; size -= temp; - next += temp; done: *sizep = size; - *nextp = next; + *nextp = next + temp; } static ssize_t fill_async_buffer(struct debug_buffer *buf) --
| Joe Perches | [PATCH 011/148] include/asm-x86/bug.h: checkpatch cleanups - formatting only |
| Arjan van de Ven | [patch] Add basic sanity checks to the syscall execution patch |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 006/196] Chinese: add translation of oops-tracing.txt |
git: | |
| Aaron Bentley | Re: VCS comparison table |
| Kevin Ballard | Re: git on MacOSX and files with decomposed utf-8 file names |
| Dmitry Potapov | Re: I'm a total push-over.. |
| Junio C Hamano | Re: Implementing branch attributes in git config |
| Richard Stallman | Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| rancor | How to copy/pipe console buffert to file? |
| Richard Stallman | Re: Real men don't attack straw men |
| Felix Radensky | RE: e1000e "Detected Tx Unit Hang" |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
| Jay Vosburgh | [PATCH 0/9]: bonding support for IPoIB |
| Jeff Garzik | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
