linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Marcelo Tosatti <marcelo@conectiva.com.br>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-ntfs-dev@lists.sourceforge.net
Subject: [2.4] off-by-one kmalloc in ntfs
Date: Sat, 14 Feb 2004 09:56:21 +1100	[thread overview]
Message-ID: <20040213225621.GA16550@gondor.apana.org.au> (raw)
In-Reply-To: <20040131045812.GA19629@gondor.apana.org.au>

[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

This patch fixes an off-by-one kmalloc bug in ntfs in 2.4.24.

Cheers,
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: p --]
[-- Type: text/plain, Size: 620 bytes --]

Index: kernel-2.4/fs/ntfs/support.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/fs/ntfs/support.c,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 support.c
--- kernel-2.4/fs/ntfs/support.c	25 Feb 2002 19:38:09 -0000	1.1.1.9
+++ kernel-2.4/fs/ntfs/support.c	12 Feb 2004 11:13:29 -0000
@@ -240,7 +240,7 @@
 				NLS_MAX_CHARSET_SIZE)) > 0) {
 			/* Adjust result buffer. */
 			if (chl > 1) {
-				buf = ntfs_malloc(*out_len + chl - 1);
+				buf = ntfs_malloc(*out_len + chl);
 				if (!buf) {
 					i = -ENOMEM;
 					goto err_ret;

  reply	other threads:[~2004-02-13 22:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-31  4:58 [2.4] invalid kfree in ntfs_printcb Herbert Xu
2004-02-13 22:56 ` Herbert Xu [this message]
2004-02-14 12:47   ` [Linux-NTFS-Dev] [2.4] off-by-one kmalloc in ntfs Szakacsits Szabolcs
2004-02-15  1:26     ` Anton Altaparmakov
2004-02-15  1:36       ` Anton Altaparmakov

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=20040213225621.GA16550@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    --cc=marcelo@conectiva.com.br \
    /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;
as well as URLs for NNTP newsgroup(s).