Merge branch 'ah/connect-parse-feature-v0-fix'

Protocol v0 clients can get stuck parsing a malformed feature line.

* ah/connect-parse-feature-v0-fix:
  connect: also update offset for features without values
This commit is contained in:
Junio C Hamano
2021-10-03 21:49:21 -07:00
2 changed files with 17 additions and 0 deletions

View File

@ -557,6 +557,8 @@ const char *parse_feature_value(const char *feature_list, const char *feature, i
if (!*value || isspace(*value)) {
if (lenp)
*lenp = 0;
if (offset)
*offset = found + len - feature_list;
return value;
}
/* feature with a value (e.g., "agent=git/1.2.3") */