Werner Koch
3627123dc8
Use inline functions to convert buffer data to scalars.
...
* include/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
This fixes sign extension on shift problems. Hanno Böck found a case
with an invalid read due to this problem. To fix that almost all uses
of "<< 24" and "<< 8" are changed by this patch to use an inline
function from host2net.h.
(back ported from commit 2183683bd633818dd031b090b5530951de76f392)
Signed-off-by: Werner Koch <wk@gnupg.org>
2015-02-12 20:34:44 +01:00
..
2013-11-27 09:32:43 +01:00
2015-02-12 20:34:44 +01:00
2014-06-24 14:37:26 +02:00
2009-12-21 16:19:09 +00:00
2014-07-21 16:05:54 +02:00
2011-12-02 19:28:02 +01:00
2012-05-24 10:55:11 +02:00
2007-11-19 16:03:50 +00:00
2009-09-03 11:29:25 +00:00
2014-06-20 20:24:52 +02:00
2013-12-11 10:33:25 +01:00
2007-11-19 16:03:50 +00:00
2007-11-19 16:03:50 +00:00
2007-11-19 16:03:50 +00:00
2013-10-11 09:18:01 +02:00
2014-06-03 08:05:54 +02:00
2013-04-23 18:06:46 +02:00
2007-07-04 19:49:40 +00:00
2007-11-19 16:03:50 +00:00
2007-07-04 19:49:40 +00:00
2007-07-04 19:49:40 +00:00
2015-02-12 20:34:44 +01:00
2013-05-07 21:17:04 +02:00
2014-10-03 20:24:03 +02:00
2014-08-06 17:09:15 +02:00
2013-08-19 11:22:11 +02:00
2007-12-04 15:00:14 +00:00
2014-11-12 10:23:53 +01:00
2007-07-04 19:49:40 +00:00
2013-01-03 20:21:20 +01:00
2009-12-21 16:19:09 +00:00
2015-01-26 14:55:24 +01:00
2015-02-12 20:34:44 +01:00
2015-02-12 20:34:44 +01:00
2012-05-24 10:55:11 +02:00
2015-02-12 18:58:36 +01:00
2009-04-03 10:34:22 +00:00
2007-07-04 19:49:40 +00:00
2014-08-06 17:11:21 +02:00
2015-02-12 20:34:44 +01:00
2014-11-24 19:27:20 +01:00
2014-06-24 13:52:02 +02:00
2007-11-19 16:03:50 +00:00
2015-02-12 20:34:44 +01:00
2014-11-14 09:36:19 +01:00
2000-07-31 08:04:16 +00:00
2014-11-12 10:23:53 +01:00
2013-08-06 10:04:12 +02:00
2009-09-03 20:51:55 +00:00
2015-02-12 20:34:44 +01:00
2014-08-26 10:16:44 +02:00
2014-06-03 08:55:31 +02:00
2008-10-03 20:00:46 +00:00
2014-06-24 10:08:39 +02:00
2011-06-13 14:35:30 +02:00
2007-07-04 19:49:40 +00:00
2014-11-14 09:36:19 +01:00
2007-07-04 19:49:40 +00:00
2009-06-05 14:11:03 +00:00
2000-07-31 08:04:16 +00:00
2009-06-24 14:03:09 +00:00
2008-12-12 12:01:20 +00:00
2008-12-12 08:54:50 +00:00
2010-03-12 17:24:06 +00:00
2010-02-12 15:15:34 +00:00
2009-06-05 14:11:03 +00:00
2015-02-12 19:32:19 +01:00
2014-09-27 15:36:02 +02:00
2009-05-26 09:29:02 +00:00
2009-08-06 20:12:00 +00:00
2008-12-11 17:44:52 +00:00
2008-10-20 13:53:23 +00:00
2015-02-12 20:34:44 +01:00
2013-10-11 09:25:58 +02:00
2007-11-19 16:03:50 +00:00
2015-02-12 20:34:44 +01:00
2012-01-19 23:03:56 -05:00
2008-10-20 13:53:23 +00:00