cpio: internalize archive_xread_all_eof. add a few paranoia checks
for corrupted cpio files. modprobe-small: remove stray include route: small code shrink function old new delta get_header_cpio 958 980 +22 archive_xread_all_eof 33 - -33 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/0 up/down: 22/-33) Total: -11 bytes
This commit is contained in:
@@ -561,8 +561,8 @@ static void INET6_displayroutes(void)
|
||||
while (1) {
|
||||
int r;
|
||||
r = fscanf(fp, "%32s%x%*s%x%32s%x%x%x%x%s\n",
|
||||
addr6x+14, &prefix_len, &slen, addr6x+40+7,
|
||||
&metric, &use, &refcnt, &iflags, iface);
|
||||
addr6x+14, &prefix_len, &slen, addr6x+40+7,
|
||||
&metric, &use, &refcnt, &iflags, iface);
|
||||
if (r != 9) {
|
||||
if ((r < 0) && feof(fp)) { /* EOF with no (nonspace) chars read. */
|
||||
break;
|
||||
|
Reference in New Issue
Block a user