On Tue, Mar 19, 2013 at 12:01:05PM +0100, Rodolfo kix Garcia wrote:
> do you have this problem with the testing/unstable version of uswsusp?
Hey, I'm also having this problem.
What happens is that csum_buf in read_or_verify() is one byte too
short, there's no space for the string terminator so it's written on
top of the variable that holds the actual checksum.
Here's the patch, found via https://sourceforge.net/projects/suspend/
Berto
Index: uswsusp-1.0+20120915/load.c
===================================================================
--- uswsusp-1.0+20120915.orig/load.c
+++ uswsusp-1.0+20120915/load.c
@@ -573,7 +573,7 @@ int read_or_verify(int dev, int fd, stru
{
static struct swap_reader handle;
static unsigned char orig_checksum[16], checksum[16];
- static char csum_buf[48];
+ static char csum_buf[49];
int error = 0, test_mode = (verify || test);
error = read_page(fd, header, start);