Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/archival/libunarchive/decompress_unzip.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1122 by niro, Sun May 30 11:32:42 2010 UTC revision 1123 by niro, Wed Aug 18 21:56:57 2010 UTC
# Line 575  static NOINLINE int inflate_codes(STATE_ Line 575  static NOINLINE int inflate_codes(STATE_
575   do {   do {
576   /* Was: nn -= (e = (e = GUNZIP_WSIZE - ((dd &= GUNZIP_WSIZE - 1) > w ? dd : w)) > nn ? nn : e); */   /* Was: nn -= (e = (e = GUNZIP_WSIZE - ((dd &= GUNZIP_WSIZE - 1) > w ? dd : w)) > nn ? nn : e); */
577   /* Who wrote THAT?? rewritten as: */   /* Who wrote THAT?? rewritten as: */
578     unsigned delta;
579    
580   dd &= GUNZIP_WSIZE - 1;   dd &= GUNZIP_WSIZE - 1;
581   e = GUNZIP_WSIZE - (dd > w ? dd : w);   e = GUNZIP_WSIZE - (dd > w ? dd : w);
582     delta = w > dd ? w - dd : dd - w;
583   if (e > nn) e = nn;   if (e > nn) e = nn;
584   nn -= e;   nn -= e;
585    
586   /* copy to new buffer to prevent possible overwrite */   /* copy to new buffer to prevent possible overwrite */
587   if (w - dd >= e) { /* (this test assumes unsigned comparison) */   if (delta >= e) {
588   memcpy(gunzip_window + w, gunzip_window + dd, e);   memcpy(gunzip_window + w, gunzip_window + dd, e);
589   w += e;   w += e;
590   dd += e;   dd += e;
# Line 1069  static int top_up(STATE_PARAM unsigned n Line 1072  static int top_up(STATE_PARAM unsigned n
1072   bytebuffer_offset = 0;   bytebuffer_offset = 0;
1073   bytebuffer_size = full_read(gunzip_src_fd, &bytebuffer[count], bytebuffer_max - count);   bytebuffer_size = full_read(gunzip_src_fd, &bytebuffer[count], bytebuffer_max - count);
1074   if ((int)bytebuffer_size < 0) {   if ((int)bytebuffer_size < 0) {
1075   bb_error_msg("read error");   bb_error_msg(bb_msg_read_error);
1076   return 0;   return 0;
1077   }   }
1078   bytebuffer_size += count;   bytebuffer_size += count;

Legend:
Removed from v.1122  
changed lines
  Added in v.1123