[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
aCaB
acab at clamav.net
Sun Apr 4 01:09:23 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit f2d320fdfe08ed930629399607fde58890ff90fc
Author: aCaB <acab at clamav.net>
Date: Tue Nov 17 13:05:25 2009 +0100
win32: fix globbing
diff --git a/win32/compat/setargv.c b/win32/compat/setargv.c
index aac320c..c8ee67a 100644
--- a/win32/compat/setargv.c
+++ b/win32/compat/setargv.c
@@ -86,11 +86,14 @@ int _setargv() {
}
if (begparm && endparm) {
if(begparm < endparm) {
- char *path = malloc(endparm - begparm + 1);
+ char *path = malloc(endparm - begparm + 1), *quotes;
int arglen = 0;
memcpy(path, begparm, endparm - begparm);
path[endparm - begparm] = '\0';
+ quotes = path;
+ while((quotes = strchr(quotes, '"')))
+ memmove(quotes, quotes + 1, (endparm - begparm) - (quotes - path));
if(argc && need_glob) {
arglen = glob_add(path, &argc, &argv);
if(!arglen) {
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list