tijl f0c5e71226 - Fix two possible overflows when testing if ELF program headers are on
the first page:
  1. Cast uint16_t operands in a multiplication to unsigned int because
     otherwise the implicit promotion to int results in a signed
     multiplication that can overflow and the behaviour on integer
     overflow is undefined.
  2. Replace (offset + size > PAGE_SIZE) with (size > PAGE_SIZE - offset)
     because the sum may overflow.
- Use the same tests to see if the path to the interpreter is on the first
  page. There's no overflow here because size is already limited by
  MAXPATHLEN, but the compiler optimises the new tests better. Also fix an
  off-by-one error.
- Simplify tests to see if an ELF note program header is on the first page.
  This also fixes an off-by-one error.

Reviewed by:	kib
MFC after:	1 week
2013-03-13 22:01:31 +00:00
..
2013-03-02 21:12:54 +00:00
2013-03-04 12:20:48 +00:00
MFC
2013-03-02 14:48:41 +00:00
2013-03-02 00:53:12 +00:00
2013-03-02 00:53:12 +00:00
2011-04-13 11:28:46 +00:00
MFC
2011-05-31 21:22:44 +00:00
2013-03-04 11:22:19 +00:00
2013-02-02 14:19:50 +00:00
2012-08-22 20:01:57 +00:00
2010-11-25 20:05:11 +00:00
2012-03-28 20:58:30 +00:00
2012-11-14 10:33:12 +00:00
MFC
2013-02-21 21:59:35 +00:00
2013-02-19 16:35:27 +00:00
2013-03-09 15:31:19 +00:00
2013-01-23 14:37:05 +00:00
2012-06-25 05:41:16 +00:00
2012-09-04 23:16:55 +00:00
MFC
2013-03-09 01:39:42 +00:00
2012-01-26 16:35:09 +00:00
2012-09-14 21:28:56 +00:00
2013-03-02 00:53:12 +00:00
2013-02-17 11:48:16 +00:00
2013-02-26 01:00:11 +00:00
2013-03-02 21:12:54 +00:00
2013-03-02 21:12:54 +00:00
2012-01-02 12:12:10 +00:00
2012-10-25 09:05:21 +00:00
2013-03-02 00:53:12 +00:00
2013-03-02 00:53:12 +00:00
2013-03-02 00:53:12 +00:00
MFC
2013-03-02 14:48:41 +00:00
MFC
2013-03-02 14:48:41 +00:00
MFC
2013-02-27 18:17:34 +00:00
MFC
2013-03-02 14:48:41 +00:00
MFC
2013-02-21 21:59:35 +00:00
2013-03-02 00:53:12 +00:00
MFC
2013-03-02 14:48:41 +00:00
MFC
2013-03-02 14:48:41 +00:00