From 78940c0e536fafc436d5e8580021927e31706847 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 19 Aug 2001 03:38:52 +0000 Subject: [PATCH] * cpio.c (cpio_read_head): Check return value of cpio_find_head, because it's not equal to super->u.cpio.type in case of errors. --- vfs/ChangeLog | 5 +++++ vfs/cpio.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index d186dd16f..b12897383 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,8 @@ +2001-08-18 Pavel Roskin + + * cpio.c (cpio_read_head): Check return value of cpio_find_head, + because it's not equal to super->u.cpio.type in case of errors. + 2001-08-16 Pavel Roskin * direntry.c (vfs_s_free_super): Remove i18n on commented out diff --git a/vfs/cpio.c b/vfs/cpio.c index 9e1ed7beb..0d8da8b1f 100644 --- a/vfs/cpio.c +++ b/vfs/cpio.c @@ -183,8 +183,7 @@ static int cpio_open_cpio_file(vfs *me, vfs_s_super *super, char *name) static int cpio_read_head(vfs *me, vfs_s_super *super) { - cpio_find_head(me, super); - switch(super->u.cpio.type) { + switch(cpio_find_head(me, super)) { case CPIO_UNKNOWN: return -1; case CPIO_BIN: