projects/linux·commit 0597d1b9

can-bcm: fix minor heap overflow

0597d1b9 · Oliver Hartkopp <[email protected]> · 2010-11-10 12:10:30 +00:00

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 <[email protected]>
Signed-off-by: Oliver Hartkopp <[email protected]>
CC: Linus Torvalds <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Commit
0597d1b99fcfc2c0eada09a698f85ed413d4ba84
Parents
6c4f1994

Changes

1 files changed · +1 −1

FileStatusAddDelContent
net/can/bcm.cmodified+1−1View file

net/can/bcm.c

View file
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 08ffe9e..6faa825 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -125,7 +125,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)