summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authordjm <djm>2014-04-20 03:33:19 +0000
committerdjm <djm>2014-04-20 03:33:19 +0000
commit57376fd34a349fc4b9d771ce3912ce84881ed9af (patch)
tree747c3ddea1546711b9158998f9b498f058721b4b /misc.h
parent11361ffdd9a4acb494fdefc1154caff94a251873 (diff)
downloadopenssh-57376fd34a349fc4b9d771ce3912ce84881ed9af.tar.gz
- djm@cvs.openbsd.org 2014/04/20 02:30:25
[misc.c misc.h umac.c] use get/put_u32 to load values rather than *((UINT32 *)p) that breaks on strict-alignment architectures; reported by and ok stsp@
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/misc.h b/misc.h
index a85e4c3a..309d4ec1 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.h,v 1.51 2014/03/26 04:55:35 djm Exp $ */
+/* $OpenBSD: misc.h,v 1.52 2014/04/20 02:30:25 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -82,6 +82,12 @@ void put_u32(void *, u_int32_t)
void put_u16(void *, u_int16_t)
__bounded(( __minbytes__, 1, 2));
+/* Little-endian store/load, used by umac.c */
+u_int32_t get_u32_le(const void *)
+ __bounded(( __minbytes__, 1, 4));
+void put_u32_le(void *, u_int32_t)
+ __bounded(( __minbytes__, 1, 4));
+
struct bwlimit {
size_t buflen;
u_int64_t rate, thresh, lamt;