Thread (1 message) 1 message, 1 author, 2016-09-12

Re: [PATCH v3] mdadm: fix a buffer overflow

From: Jes Sorensen <hidden>
Date: 2016-09-12 16:51:55

Song Liu [off-list ref] writes:
struct mdp_superblock_1.set_name is 32B long, but struct mdinfo.name
is 33B long. So we need strncpy instead strcpy to avoid buffer
overflow.

Signed-off-by: Song Liu <redacted>
---
 super1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Applied thanks!

Note there is at least one place with a str operation hardcoding the
length of set_name to 32. Would you mind fixing that too?

Cheers,
Jes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help