diff --git a/src/vfs/cpio/cpio.c b/src/vfs/cpio/cpio.c index f1121b4a0..ec79f5973 100644 --- a/src/vfs/cpio/cpio.c +++ b/src/vfs/cpio/cpio.c @@ -737,6 +737,8 @@ cpio_open_archive (struct vfs_s_super *super, const vfs_path_t * vpath, ssize_t status; status = cpio_read_head (vpath_element->class, super); + if (status < 0) + return (-1); switch (status) {