From: Ben Gras Date: Sat, 16 Mar 2013 04:13:02 +0000 (+0000) Subject: vfs: coredump fix: write zeroes for missing memory X-Git-Tag: v3.3.0~1078 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=4f9139778da385083c8de55116110dbebefd06df;p=minix.git vfs: coredump fix: write zeroes for missing memory --- diff --git a/servers/vfs/coredump.c b/servers/vfs/coredump.c index 43ccfda4f..9b5d24573 100644 --- a/servers/vfs/coredump.c +++ b/servers/vfs/coredump.c @@ -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) ?