diff options
Diffstat (limited to 'g10/misc.c')
-rw-r--r-- | g10/misc.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/g10/misc.c b/g10/misc.c index 9ffe09de7..51c0e6757 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -673,11 +673,23 @@ optsep(char **stringp) ptr++; } - /* There is an argument, so grab that too. */ + /* There is an argument, so grab that too. At this point, + ptr points to the first character of the argument. */ if(sawequals) - end=strpbrk(ptr," ,"); + { + /* Is it a quoted argument? */ + if(*ptr=='"') + { + ptr++; + end=strchr(ptr,'"'); + if(end) + end++; + } + else + end=strpbrk(ptr," ,"); + } - if(end) + if(end && *end) { *end='\0'; *stringp=end+1; |