void *rawbuf;
posix_memalign(&rawbuf, 4096, len + buf_align);
void *buf = (char *)rawbuf + buf_align;
+ memset(buf, 0, len);
pread(fd, buf, len, offset);
close(fd);
int r = verify_pattern(buf, len, offset);
void *rawbuf;
posix_memalign(&rawbuf, 4096, len + buf_align);
void *buf = (char *)rawbuf + buf_align;
+ memset(buf, 0, len);
pread(fd, buf, len, offset);
close(fd);
int r = verify_pattern(buf, len, offset);
fd = open("foo", O_RDONLY);
void *buf2 = malloc(len);
+ memset(buf2, 0, len);
pread(fd, buf2, len, offset);
close(fd);
fd = open("foo", O_RDONLY);
void *buf2 = malloc(len);
+ memset(buf2, 0, len);
pread(fd, buf2, len, offset);
close(fd);