2440544c0c
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@
34 lines
1.0 KiB
Plaintext
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;
|