From 0ef499deaadd7ce0af9c108bf2837418351b0265 Mon Sep 17 00:00:00 2001 From: Li-Ta Lo Date: Thu, 17 Jan 2002 10:20:28 +0000 Subject: [PATCH] fixed a very old buffer overflow bug --- src/rom/docmil_fill_inbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rom/docmil_fill_inbuf.c b/src/rom/docmil_fill_inbuf.c index 07898a1fed..9cadc42e4b 100644 --- a/src/rom/docmil_fill_inbuf.c +++ b/src/rom/docmil_fill_inbuf.c @@ -68,7 +68,7 @@ memcpy_from_doc_mil(void *dest, const void *src, size_t n) int i; unsigned long address = (unsigned long) src; - for (i = n; i >= 0; i -= 0x200) { + for (i = n; i > 0; i -= 0x200) { unsigned short c = 0x1000; volatile unsigned char dummy;