Re: Crash in vfs_s_close()
- From: Pavel Roskin <proski gnu org>
- To: Pavel Machek <pavel suse cz>
- Cc: <mc-devel gnome org>
- Subject: Re: Crash in vfs_s_close()
- Date: Sat, 18 Aug 2001 23:39:48 -0400 (EDT)
Hi!
> > I was playing with compressed cpio files on fish and soon after that MC
> > crashed. I cannot reproduce this problem.
I remember that some broken cpio archives were involved. I could
reproduce the problem when MC crashes immediately on entering a truncated
cpio archive on ftpfs (that time it was fish).
I don't know if this bug is related (I think 20% probability that it is),
but I'm fixing it anyway.
------------------------------------------
--- ChangeLog
+++ ChangeLog
@@ -1 +1,6 @@
+2001-08-18 Pavel Roskin <proski gnu org>
+
+ * 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 <proski gnu org>
--- cpio.c
+++ cpio.c
@@ -183,8 +183,7 @@ static int cpio_open_cpio_file(vfs *me,
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:
------------------------------------------
By the way, fh->changed=129 clearly indicates memory corruption. The code
only assigns 0 and 1 to it.
--
Regards,
Pavel Roskin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]