From: Shawn Lewis Date: Thu, 2 Aug 2007 20:17:52 +0000 (+0200) Subject: [PATCH] Fix memswp. Its scratch space was too small X-Git-Tag: fio-1.17~9 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=dee6de74152299f2a7df07ae971a53441b971daf;ds=sidebyside [PATCH] Fix memswp. Its scratch space was too small Signed-off-by: Jens Axboe --- diff --git a/verify.c b/verify.c index d9a68d65..6f67dffa 100644 --- a/verify.c +++ b/verify.c @@ -83,7 +83,9 @@ static void fill_pattern(struct thread_data *td, void *p, unsigned int len) static void memswp(void* buf1, void* buf2, unsigned int len) { - struct verify_header swap; + char swap[200]; + + assert(len <= sizeof(swap)); memcpy(&swap, buf1, len); memcpy(buf1, buf2, len);