xbps-checkvers: fixed an endless loop with "reverts" containing extra alphanumeric chars.

This commit is contained in:
Juan RP
2015-07-27 09:44:25 +02:00
parent 8acc375487
commit 0d5385ad2b
3 changed files with 36 additions and 1 deletions

View File

@@ -533,7 +533,7 @@ check_reverts(const char *repover, const map_item_t reverts)
* Check if it's the first character or the previous character is a
* whitespace.
*/
if (p > sreverts && !isspace(p[-1]))
if (p > sreverts && !isalpha(p[-1]) && !isspace(p[-1]))
continue;
p += strlen(repover);
/*