$OpenBSD: patch-clamdscan_client_c,v 1.3 2005/05/12 14:55:21 mbalmer Exp $ --- clamdscan/client.c.orig Sun Feb 6 20:28:03 2005 +++ clamdscan/client.c Sun Apr 10 10:00:25 2005 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -283,18 +284,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; }