summaryrefslogtreecommitdiffstats
path: root/sys/lib/libsa/tftp.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-03-28 01:12:58 +0000
committerguenther <guenther@openbsd.org>2014-03-28 01:12:58 +0000
commite5d996e88924d8c98cfaa95f867998faf97186c5 (patch)
treef2ca8f3fb646b3d5e77c64a4fa234fefe37e64e1 /sys/lib/libsa/tftp.c
parentunbreak mfii after i changed the layout of some structures it borrows (diff)
downloadwireguard-openbsd-e5d996e88924d8c98cfaa95f867998faf97186c5.tar.xz
wireguard-openbsd-e5d996e88924d8c98cfaa95f867998faf97186c5.zip
Fix alignment of tftp structure by changing the 'header' member's type
to a struct with the necessary alignment. analysis and ok kettenis@
Diffstat (limited to 'sys/lib/libsa/tftp.c')
-rw-r--r--sys/lib/libsa/tftp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/lib/libsa/tftp.c b/sys/lib/libsa/tftp.c
index dd570551724..d685be5ee73 100644
--- a/sys/lib/libsa/tftp.c
+++ b/sys/lib/libsa/tftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftp.c,v 1.3 2009/03/02 00:00:56 krw Exp $ */
+/* $OpenBSD: tftp.c,v 1.4 2014/03/28 01:12:58 guenther Exp $ */
/* $NetBSD: tftp.c,v 1.15 2003/08/18 15:45:29 dsl Exp $ */
/*
@@ -74,7 +74,7 @@ struct tftp_handle {
int off;
const char *path; /* saved for re-requests */
struct {
- u_char header[HEADER_SIZE];
+ struct packet_header header;
struct tftphdr t;
u_char space[RSPACE];
} lastdata;
@@ -153,7 +153,7 @@ int
tftp_makereq(struct tftp_handle *h)
{
struct {
- u_char header[HEADER_SIZE];
+ struct packet_header header;
struct tftphdr t;
u_char space[FNAME_SIZE + 6];
} wbuf;
@@ -198,7 +198,7 @@ int
tftp_getnextblock(struct tftp_handle *h)
{
struct {
- u_char header[HEADER_SIZE];
+ struct packet_header header;
struct tftphdr t;
} wbuf;
char *wtail;
@@ -233,7 +233,7 @@ void
tftp_terminate(struct tftp_handle *h)
{
struct {
- u_char header[HEADER_SIZE];
+ struct packet_header header;
struct tftphdr t;
} wbuf;
char *wtail;