Rockbox mail archiveSubject: Memset corrupts memory?
Memset corrupts memory?
From: Alex Gitelman <alex_at_fg-soup.com>
Date: Tue, 16 Jul 2002 22:49:12 -0700
After recent changes the following code crashes my recorder on file
Reducing count in memset, say to 64 or removing memset altogether
allows it to run.
Crash consists of recorder showing some meaningless word (Stkov in my
case - always), HD ligh is on and it hangs.
/test.txt is a small (non empty file) I also tried with bigger files.
unsigned char out_buf;
int fd = open("/test.txt", O_RDONLY);
memset(out_buf, 0x00, 5000);
read(fd, out_buf, 64);
Received on 2002-07-17