From ticket #3116: fix segfault in cpio VFS while reading corrupted RPM.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Eugene San (eugenesan) 2013-12-03 10:09:28 +02:00 committed by Andrew Borodin
parent 198334ccc4
commit 65b83b3efc

View File

@ -787,7 +787,8 @@ cpio_super_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *p
return 0;
/* Has the cached archive been changed on the disk? */
if (((cpio_super_data_t *) parc->data)->st.st_mtime < archive_stat->st_mtime)
if (parc->data != NULL
&& ((cpio_super_data_t *) parc->data)->st.st_mtime < archive_stat->st_mtime)
{
/* Yes, reload! */
(*vfs_cpiofs_ops.free) ((vfsid) parc);