lkml.org 
[lkml]   [2004]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[2.4] off-by-one kmalloc in ntfs
From
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
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;
\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.319 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site