Commit f450da42 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Allow tab as a delimiter in smime .index files. (closes #3802)

The old parsing code used fscanf, and so happened to allow a tab as a
delimiter.  Even though uses a space, some users
maintain their own .index files by hand (using tab delimiters), so
continue to allow that delimiter.

Thanks to Andre for the bug report and patch.
parent 10f1dc2c
......@@ -509,7 +509,12 @@ static smime_key_t *smime_parse_key(char *buf)
for (p = buf; p; p = pend)
if ((pend = strchr (p, ' ')) || (pend = strchr (p, '\n')))
/* Some users manually maintain their .index file, and use a tab
* as a delimiter, which the old parsing code (using fscanf)
* happened to allow. uses a space, so search for both.
if ((pend = strchr (p, ' ')) || (pend = strchr (p, '\t')) ||
(pend = strchr (p, '\n')))
*pend++ = 0;
/* For backward compatibility, don't count consecutive delimiters
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment