From: Magnus Damm <magnus@valinux.co.jp>
To: linux-kernel@vger.kernel.org
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Vivek Goyal <vgoyal@in.ibm.com>,
magnus.damm@gmail.com, Horms <horms@verge.net.au>,
Magnus Damm <magnus@valinux.co.jp>,
Dave Anderson <anderson@redhat.com>,
ebiederm@xmission.com, Jakub Jelinek <jakub@redhat.com>,
David Miller <davem@davemloft.net>
Subject: [PATCH 02/03] Elf: Include terminating zero in n_namesz
Date: Tue, 14 Nov 2006 22:01:09 +0900 [thread overview]
Message-ID: <20061114130109.24180.97758.sendpatchset@localhost> (raw)
In-Reply-To: <20061114130057.24180.34095.sendpatchset@localhost>
elf: Include terminating zero in n_namesz
The ELF32 spec says we should plus we include the zero on other platforms.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
---
arch/mips/kernel/irixelf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- 0003/arch/mips/kernel/irixelf.c
+++ work/arch/mips/kernel/irixelf.c 2006-11-14 20:56:54.000000000 +0900
@@ -1009,7 +1009,7 @@ static int notesize(struct memelfnote *e
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;
@@ -1028,7 +1028,7 @@ static int writenote(struct memelfnote *
{
struct elf_note en;
- en.n_namesz = strlen(men->name);
+ en.n_namesz = strlen(men->name) + 1;
en.n_descsz = men->datasz;
en.n_type = men->type;
next prev parent reply other threads:[~2006-11-14 13:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-14 13:00 [PATCH 00/03] Elf: Various fixes Magnus Damm
2006-11-14 13:01 ` [PATCH 01/03] Elf: Always define elf_addr_t in linux/elf.h Magnus Damm
2006-11-14 13:01 ` Magnus Damm [this message]
2006-11-14 13:01 ` [PATCH 03/03] Elf: Fix kcore note size calculation Magnus Damm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061114130109.24180.97758.sendpatchset@localhost \
--to=magnus@valinux.co.jp \
--cc=anderson@redhat.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=horms@verge.net.au \
--cc=jakub@redhat.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=vgoyal@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.