1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00
Werner Koch 2183683bd6 Use inline functions to convert buffer data to scalars.
* common/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.
--

Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on shift problems.  Hanno Böck found a case
with an invalid read due to this problem.  To fix that once and for
all almost all uses of "<< 24" and "<< 8" are changed by this patch to
use an inline function from host2net.h.

Signed-off-by: Werner Koch <wk@gnupg.org>
2015-02-11 10:28:25 +01:00
..
2011-03-03 12:40:54 +01:00
2014-11-28 09:44:19 +01:00
2014-11-28 09:44:19 +01:00
2014-09-18 15:17:44 +02:00
2014-09-18 15:17:44 +02:00
2014-11-28 09:44:19 +01:00
2014-06-03 21:35:59 +02:00
2014-11-11 10:13:10 +01:00
2015-01-26 17:56:52 +01:00
2012-08-24 09:44:33 +02:00