[PATCH] Fix memswp. It's scratch space was too small.

From: Shawn Lewis <shawnlewis_at_google.com>
Date: Thu, 2 Aug 2007 12:48:57 -0700 (PDT)

diff --git a/verify.c b/verify.c
index d9a68d6..6f67dff 100644
--- a/verify.c
+++ b/verify.c
@@ -83,7 +83,9 @@ static void fill_pattern(struct thread_d
 
 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);
Received on Thu Aug 02 2007 - 21:48:57 CEST

This archive was generated by hypermail 2.2.0 : Thu Aug 02 2007 - 22:00:01 CEST