mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Altaparmakov <aia21@cus.cam.ac.uk>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.4.7 tiny NTFS fix
Date: Sun, 22 Jul 2001 21:12:24 +0100 (BST)	[thread overview]
Message-ID: <E15OPaS-0002yz-00@draco.cus.cam.ac.uk> (raw)

Linus,

Please apply below patch (this time properly inlined I hope). It is
against 2.4.7-pre8 but should apply cleanly to 2.4.7. It adds a return
value check.

Thanks to Rasmus Andersen for initial patch.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

------ cut here ------
--- linux-2.4.7-pre8-vanilla/fs/ntfs/dir.c.old	Sun Jul 22 21:03:08 2001
+++ linux-2.4.7-pre8-vanilla/fs/ntfs/dir.c	Sun Jul 22 21:02:59 2001
@@ -894,6 +894,11 @@
 		return -EIO;
 	}
 	attr = ntfs_find_attr(ino, vol->at_index_allocation, I30);
+	if (!attr) {
+		ntfs_free(buf);
+		ntfs_debug(DEBUG_DIR3, "unsorted 9.5\n");
+		return -EIO;
+	}
 	while (1) {
 		if ((__s64)*p_high << vol->cluster_size_bits > attr->size) {
 			/* No more index records. */

                 reply	other threads:[~2001-07-22 20:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E15OPaS-0002yz-00@draco.cus.cam.ac.uk \
    --to=aia21@cus.cam.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®