Rockbox mail archive
Subject: Memset corrupts memory?
From: Alex Gitelman (alex_at_fg-soup.com)
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);
Page was last modified "Jan 10 2012" The Rockbox Crew