openbsd-ports/net/dnsmasq/patches/patch-src_tftp_c
sthen 2440544c0c Update to 2.51, various updates and rolls in the security fixes for
CVE-2009-2957 and CVE-2009-2958 relating to tftp (these were fixed in
2.50; we had them as patches in -current before).

ok rui@
2009-12-27 19:34:33 +00:00

34 lines
1.0 KiB
Plaintext

$OpenBSD: patch-src_tftp_c,v 1.7 2009/12/27 19:34:33 sthen Exp $
gcc2 fixes to struct errmess, struct oackmess, struct datamess from kili
--- src/tftp.c.orig Tue Aug 25 20:51:53 2009
+++ src/tftp.c Thu Dec 24 14:21:01 2009
@@ -495,7 +495,7 @@ static ssize_t tftp_err(int err, char *packet, char *m
{
struct errmess {
unsigned short op, err;
- char message[];
+ char message[0];
} *mess = (struct errmess *)packet;
ssize_t ret = 4;
char *errstr = strerror(errno);
@@ -522,7 +522,7 @@ static ssize_t get_block(char *packet, struct tftp_tra
char *p;
struct oackmess {
unsigned short op;
- char data[];
+ char data[0];
} *mess = (struct oackmess *)packet;
p = mess->data;
@@ -545,7 +545,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[0];
} *mess = (struct datamess *)packet;
size_t size = transfer->file->size - transfer->offset;