vfs: coredump fix: write zeroes for missing memory

This commit is contained in:
Ben Gras 2013-03-16 04:13:02 +00:00
parent 50e46307de
commit 4f9139778d

View file

@ -310,9 +310,9 @@ static void dump_segments(struct filp *f, Elf_Phdr phdrs[], int phnum)
(phys_bytes) CLICK_SIZE);
if(r != OK) {
printf("VFS: vircopy failed for %d @ 0x%lx during coredump\n",
fp->fp_endpoint, p);
break;
/* memory didn't exist; write as zeroes */
memset(buf, 0, sizeof(buf));
continue;
}
write_buf(f, (char *) buf, (off + CLICK_SIZE <= (off_t) len) ?