openbsd-ports/net/dnsmasq/patches/patch-src_tftp_c
2007-09-26 19:51:33 +00:00

31 lines
975 B
Plaintext

$OpenBSD: patch-src_tftp_c,v 1.3 2007/09/26 19:51:33 rui Exp $
--- src/tftp.c.orig Mon Jul 23 19:33:37 2007
+++ src/tftp.c Tue Sep 25 09:28:25 2007
@@ -448,7 +448,7 @@ static ssize_t tftp_err(int err, char *packet, char *m
{
struct errmess {
unsigned short op, err;
- char message[];
+ char *message;
} *mess = (struct errmess *)packet;
ssize_t ret = 4;
char *errstr = strerror(errno);
@@ -476,7 +476,7 @@ static ssize_t get_block(char *packet, struct tftp_tra
char *p;
struct oackmess {
unsigned short op;
- char data[];
+ char *data;
} *mess = (struct oackmess *)packet;
p = mess->data;
@@ -499,7 +499,7 @@ static ssize_t get_block(char *packet, struct tftp_tra
/* send data packet */
struct datamess {
unsigned short op, block;
- unsigned char data[];
+ unsigned char *data;
} *mess = (struct datamess *)packet;
off_t offset = transfer->blocksize * (transfer->block - 1);