From: hartkopp Date: Sat, 13 Nov 2010 16:43:29 +0000 (+0000) Subject: can-bcm: fix minor heap overflow X-Git-Url: https://rtime.felk.cvut.cz/gitweb/socketcan-devel.git/commitdiff_plain/39cd6f47939aaf786a6517905df5f021fbdfe932?ds=sidebyside can-bcm: fix minor heap overflow On 64-bit platforms the ASCII representation of a pointer may be up to 17 bytes long. This patch increases the length of the buffer accordingly. http://marc.info/?l=linux-netdev&m=128872251418192&w=2 Reported-by: Dan Rosenberg Signed-off-by: Oliver Hartkopp CC: Linus Torvalds Signed-off-by: David S. Miller Upstream Commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=0597d1b99fcfc2c0eada09a698f85ed413d4ba84 git-svn-id: svn://svn.berlios.de//socketcan/trunk@1200 030b6a49-0b11-0410-94ab-b0dab22257f2 --- diff --git a/kernel/2.6/net/can/bcm.c b/kernel/2.6/net/can/bcm.c index 1e4ac66..9ffad22 100644 --- a/kernel/2.6/net/can/bcm.c +++ b/kernel/2.6/net/can/bcm.c @@ -140,7 +140,7 @@ struct bcm_sock { struct list_head tx_ops; unsigned long dropped_usr_msgs; struct proc_dir_entry *bcm_proc_read; - char procname [9]; /* pointer printed in ASCII with \0 */ + char procname [20]; /* pointer printed in ASCII with \0 */ }; static inline struct bcm_sock *bcm_sk(const struct sock *sk)