$OpenBSD: patch-clamdscan_client_c,v 1.6 2007/03/25 11:24:02 mbalmer Exp $
--- clamdscan/client.c.orig	Wed Feb 28 00:44:45 2007
+++ clamdscan/client.c	Tue Mar 13 09:33:36 2007
@@ -27,6 +27,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
+#include <sys/param.h>
 #include <sys/un.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -287,18 +288,18 @@ static int dsstream(int sockd, const str
 static char *abpath(const char *filename)
 {
 	struct stat foo;
-	char *fullpath, cwd[200];
+	char *fullpath, cwd[MAXPATHLEN];
 
     if(stat(filename, &foo) == -1) {
 	logg("^Can't access file %s\n", filename);
 	perror(filename);
 	return NULL;
     } else {
-	fullpath = malloc(200 + strlen(filename) + 10);
+	fullpath = malloc(sizeof(cwd) + strlen(filename) + 10);
 #ifdef C_CYGWIN
 	sprintf(fullpath, "%s", filename);
 #else
-	if(!getcwd(cwd, 200)) {
+	if(!getcwd(cwd, MAXPATHLEN)) {
 	    logg("^Can't get absolute pathname of current working directory.\n");
 	    return NULL;
 	}
