search for: unziplen

Displaying 1 result from an estimated 1 matches for "unziplen".

Did you mean: unziped
2009 Jul 09
2
libxc: Question on kernel image unzipping
...used when uncompressing zipped kernel images: /* ------------------------------------------------------------------------ */ /* read files, copy memory blocks, with transparent gunzip */ size_t xc_dom_check_gzip(void *blob, size_t ziplen) { unsigned char *gzlen; size_t unziplen; if ( strncmp(blob, "\037\213", 2) ) /* not gzipped */ return 0; gzlen = blob + ziplen - 4; unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0]; if ( (unziplen < 0) || (unziplen > (1024*1024*1024)) ) /* 1GB limit...