From c3680ef0b5c4c4fe71a8badba562780bd45ddce4 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Mon, 12 May 2014 13:54:33 +0100 Subject: [PATCH] Fix pair of buffer size errors. Bug 1478 Reported-by: David Binderman --- src/Makefile | 1 + src/OS/os.c-Linux | 2 +- src/src/malware.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index b913aec8a..99f4ab308 100644 --- a/src/Makefile +++ b/src/Makefile @@ -94,6 +94,7 @@ cscope.files: FRC -o -name "os.h*" -print \ -o -name "*akefile*" -print \ -o -name EDITME -print >> $@ + ls OS/* >> $@ FRC: diff --git a/src/OS/os.c-Linux b/src/OS/os.c-Linux index 1e8a6f47d..df0dff9db 100644 --- a/src/OS/os.c-Linux +++ b/src/OS/os.c-Linux @@ -94,7 +94,7 @@ ip_address_item *last = NULL; ip_address_item *next; char addr6p[8][5]; unsigned int plen, scope, dad_status, if_idx; -char devname[20]; +char devname[20+1]; FILE *f; #endif diff --git a/src/src/malware.c b/src/src/malware.c index cae0cdd99..2d2a8c892 100644 --- a/src/src/malware.c +++ b/src/src/malware.c @@ -42,7 +42,7 @@ static struct scan #define MAX_CLAMD_ADDRESS_LENGTH_S "64" typedef struct clamd_address_container { - uschar tcp_addr[MAX_CLAMD_ADDRESS_LENGTH]; + uschar tcp_addr[MAX_CLAMD_ADDRESS_LENGTH+1]; unsigned int tcp_port; } clamd_address_container; -- 2.25.1