[BusyBox] seek_sub_file in unarchive.c broken?

Matt Kraai kraai at alumni.carnegiemellon.edu
Tue Sep 25 09:25:16 UTC 2001


Howdy,

This is partially fixed in uClibc CVS.  I'm waiting for approval
to check in the second part of the fix.  If you are impatient, you
can apply the following to the latest CVS:

Index: libc/stdio/stdio.c
===================================================================
RCS file: /var/cvs/uClibc/libc/stdio/stdio.c,v
retrieving revision 1.32
diff -c -3 -p -r1.32 stdio.c
*** libc/stdio/stdio.c	2001/09/25 15:18:12	1.32
--- libc/stdio/stdio.c	2001/09/25 15:21:18
*************** int fseek(FILE *fp, long int offset, int
*** 592,598 ****
  
  	if ((fp->mode & __MODE_ERR) || 
  		(((ref != SEEK_CUR) || offset) && (lseek(fp->fd, offset, ref) < 0))) {
- 		fp->mode |= __MODE_ERR;	/* Possibly redundant, but doesn't hurt. */
  		return -1;
  	}
  
--- 592,597 ----

I believe that this should fix your problem.

Matt





More information about the busybox mailing list