mc/mc-VFSsegfault.patch
2013-03-21 11:05:05 +01:00

13 lines
456 B
Diff

diff -up mc-4.8.7/lib/vfs/direntry.c.VFSsegfault mc-4.8.7/lib/vfs/direntry.c
--- mc-4.8.7/lib/vfs/direntry.c.VFSsegfault 2012-12-27 09:13:20.000000000 +0100
+++ mc-4.8.7/lib/vfs/direntry.c 2013-03-21 10:54:15.344172569 +0100
@@ -656,6 +656,8 @@ vfs_s_close (void *fh)
int res = 0;
struct vfs_class *me = FH_SUPER->me;
+ if (!me) return -1;
+
FH_SUPER->fd_usage--;
if (!FH_SUPER->fd_usage)
vfs_stamp_create (me, FH_SUPER);