"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/bled/decompress_bunzip2.c" between
rufus-3.12.tar.gz and rufus-3.13.tar.gz

About: Rufus is a utility that helps format and create bootable USB flash drives, such as USB keys/pendrives, memory sticks, etc (for Linux and Windows).

decompress_bunzip2.c  (rufus-3.12):decompress_bunzip2.c  (rufus-3.13)
skipping to change at line 681 skipping to change at line 681
BZh0 = ('B' << 24) + ('Z' << 16) + ('h' << 8) + '0', BZh0 = ('B' << 24) + ('Z' << 16) + ('h' << 8) + '0',
h0 = ('h' << 8) + '0', h0 = ('h' << 8) + '0',
}; };
/* Figure out how much data to allocate */ /* Figure out how much data to allocate */
i = sizeof(bunzip_data); i = sizeof(bunzip_data);
if (in_fd != -1) i += IOBUF_SIZE; if (in_fd != -1) i += IOBUF_SIZE;
/* Allocate bunzip_data. Most fields initialize to zero. */ /* Allocate bunzip_data. Most fields initialize to zero. */
bd = *bdp = xzalloc(i); bd = *bdp = xzalloc(i);
if (bd == NULL)
return -1;
/* Setup input buffer */ /* Setup input buffer */
bd->in_fd = in_fd; bd->in_fd = in_fd;
if (-1 == in_fd) { if (-1 == in_fd) {
/* in this case, bd->inbuf is read-only */ /* in this case, bd->inbuf is read-only */
bd->inbuf = (void*)inbuf; /* cast away const-ness */ bd->inbuf = (void*)inbuf; /* cast away const-ness */
} else { } else {
bd->inbuf = (uint8_t*)(bd + 1); bd->inbuf = (uint8_t*)(bd + 1);
memcpy(bd->inbuf, inbuf, len); memcpy(bd->inbuf, inbuf, len);
} }
skipping to change at line 743 skipping to change at line 745
IF_DESKTOP(long long total_written = 0;) IF_DESKTOP(long long total_written = 0;)
bunzip_data *bd; bunzip_data *bd;
char *outbuf; char *outbuf;
int i, nwrote; int i, nwrote;
unsigned len; unsigned len;
if (check_signature16(xstate, BZIP2_MAGIC)) if (check_signature16(xstate, BZIP2_MAGIC))
return -1; return -1;
outbuf = xmalloc(IOBUF_SIZE); outbuf = xmalloc(IOBUF_SIZE);
if (outbuf == NULL)
return -1;
len = 0; len = 0;
while (1) { /* "Process one BZ... stream" loop */ while (1) { /* "Process one BZ... stream" loop */
i = start_bunzip(&bd, xstate->src_fd, outbuf + 2, len); i = start_bunzip(&bd, xstate->src_fd, outbuf + 2, len);
if (i == 0) { if (i == 0) {
while (1) { /* "Produce some output bytes" loop */ while (1) { /* "Produce some output bytes" loop */
i = read_bunzip(bd, outbuf, IOBUF_SIZE); i = read_bunzip(bd, outbuf, IOBUF_SIZE);
if (i < 0) /* error? */ if (i < 0) /* error? */
break; break;
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)