[BusyBox] Bug in busybox cp copy_file_chunk.

Erik Andersen andersen at lineo.com
Thu May 31 10:41:44 UTC 2001


On Thu May 31, 2001 at 08:18:38AM -0400, Brenk, Rudger van wrote:
> Hi Erik,
> 
> I've found a bug in busybox copy app. When my JFFS returns an error code (such
> as -28 no space left on device) the cp app will keep on trying to copy this
> chunk to the flash. The full write function will return -28 but this return code
> is tested against the size_t size (size_t is defined as unsigned long int). For
> all negative codes this will fail.
> 
> Since full_write will only return size or the error code this line can be
> changed in if (full_write(......,....) < 0) return FALSE;

Technically, this means that JFFS is violating the fwrite interface.
Fortunately, we already handle this case with the latest from CVS,

 -Erik

--
Erik B. Andersen   email:  andersen at lineo.com
--This message was written using 73% post-consumer electrons--





More information about the busybox mailing list