From 6c8dca8c44663a0177d213bff00387ae71419db1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 19 Aug 2007 01:06:26 +0000 Subject: fix an off-by-one error git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8427 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch | 2 +- target/linux/generic-2.6/patches/065-block2mtd_init.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'target/linux') diff --git a/target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch b/target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch index c653c6a3f3..bae70d41b6 100644 --- a/target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch +++ b/target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch @@ -32,7 +32,7 @@ diff -urN linux-2.6.21.1.old/drivers/mtd/devices/block2mtd.c linux-2.6.21.1.dev/ + if (!mtdname) + mtdname = devname; + -+ dev->mtd.name = kmalloc(strlen(mtdname), GFP_KERNEL); ++ dev->mtd.name = kmalloc(strlen(mtdname) + 1, GFP_KERNEL); + if (!dev->mtd.name) goto devinit_err; diff --git a/target/linux/generic-2.6/patches/065-block2mtd_init.patch b/target/linux/generic-2.6/patches/065-block2mtd_init.patch index 57a8615a02..bdb19eeccb 100644 --- a/target/linux/generic-2.6/patches/065-block2mtd_init.patch +++ b/target/linux/generic-2.6/patches/065-block2mtd_init.patch @@ -32,7 +32,7 @@ diff -urN linux-2.6.21.1.old/drivers/mtd/devices/block2mtd.c linux-2.6.21.1.dev/ + if (!mtdname) + mtdname = devname; + -+ dev->mtd.name = kmalloc(strlen(mtdname), GFP_KERNEL); ++ dev->mtd.name = kmalloc(strlen(mtdname) + 1, GFP_KERNEL); + if (!dev->mtd.name) goto devinit_err; -- cgit v1.2.3