X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=fs%2Fproc%2Fkcore.c;h=1294eda4acaeefc5739bd4ad267a7fca2dd679dd;hb=59458f40e25915a355d8b1d701425fe9f4f9ea23;hp=3ceff385727273269018a6e4780a97a6bd234cc6;hpb=ac7f6b5e44cb0982b98c31fa33298ba73fb5dcfc;p=linux-2.6-omap-h63xx.git diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 3ceff385727..1294eda4aca 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -100,7 +100,7 @@ static int notesize(struct memelfnote *en) int sz; sz = sizeof(struct elf_note); - sz += roundup(strlen(en->name), 4); + sz += roundup((strlen(en->name) + 1), 4); sz += roundup(en->datasz, 4); return sz; @@ -116,7 +116,7 @@ static char *storenote(struct memelfnote *men, char *bufp) #define DUMP_WRITE(addr,nr) do { memcpy(bufp,addr,nr); bufp += nr; } while(0) - en.n_namesz = strlen(men->name); + en.n_namesz = strlen(men->name) + 1; en.n_descsz = men->datasz; en.n_type = men->type;