$OpenBSD: patch-clamdscan_client_c,v 1.4 2006/08/15 18:48:22 mbalmer Exp $
--- clamdscan/client.c.orig	Thu Apr 20 10:52:19 2006
+++ clamdscan/client.c	Fri Jul 28 02:28:02 2006
@@ -26,6 +26,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>
@@ -294,18 +295,18 @@ int dsstream(int sockd, const struct opt
 char *abpath(const char *filename)
 {
 	struct stat foo;
-	char *fullpath, cwd[200];
+	char *fullpath, cwd[MAXPATHLEN];
 
     if(stat(filename, &foo) == -1) {
 	mprintf("@Can't access file %s\n", filename);
 	perror(filename);
 	return NULL;
     } else {
-	fullpath = mcalloc(200 + strlen(filename) + 10, sizeof(char));
+	fullpath = mcalloc(sizeof(cwd) + strlen(filename) + 10, sizeof(char));
 #ifdef C_CYGWIN
 	sprintf(fullpath, "%s", filename);
 #else
-	if(!getcwd(cwd, 200)) {
+	if(!getcwd(cwd, sizeof(cwd))) {
 	    mprintf("@Can't get absolute pathname of current working directory.\n");
 	    return NULL;
 	}
