mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux/fs/binfmt_elf.c removal of check
@ 2005-11-13  2:15 sigint
  0 siblings, 0 replies; only message in thread
From: sigint @ 2005-11-13  2:15 UTC (permalink / raw)
  To: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Attached is a small patch that deletes an unneccesary check in
binfmt_elf.c load_elf_binary().

'end_code' is initialized to 0 on line 602 but 'k' is initialized
to 'k = elf_ppnt->p_vaddr + elf_ppnt->p_filesz' on line 880. This
check (may) not be neccessary because on line 614 elf_ppnt-
>p_filesz is checked against PATH_MAX and the integer 2. elf_ppnt-
>p_filesz does not appear to be altered before the check. Please
double check the change, but I do not think the comparison is
needed on line 881. I am not on the list please CC me on any
replies. Thanks

patch produced with 'diff -Npur'

- --- a/fs/binfmt_elf.c   2005-11-12 22:19:08.000000000 -0500
+++ b/fs/binfmt_elf.c   2005-11-12 22:17:54.000000000 -0500
@@ -878,7 +878,7 @@ static int load_elf_binary(struct linux_

                if (k > elf_bss)
                        elf_bss = k;
- -               if ((elf_ppnt->p_flags & PF_X) && end_code < k)
+               if ((elf_ppnt->p_flags & PF_X))
                        end_code = k;
                if (end_data < k)
                        end_data = k;
-----BEGIN PGP SIGNATURE-----
Note: This signature can be verified at https://www.hushtools.com/verify
Version: Hush 2.4

wkYEARECAAYFAkN2slwACgkQ8+KJMsQVzCE42gCgiYrs5iWz95OlcZRgYGxJh7XeZd8A
n3pGiikzdQh2RJe/GLJbyy/Q427/
=TTTY
-----END PGP SIGNATURE-----




Concerned about your privacy? Instantly send FREE secure email, no account required
http://www.hushmail.com/send?l=480

Get the best prices on SSL certificates from Hushmail
https://www.hushssl.com?l=485


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-13  2:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-13  2:15 linux/fs/binfmt_elf.c removal of check sigint

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®