projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Improve config file escape sanity checking
[git.git]
/
config.c
diff --git
a/config.c
b/config.c
index
f3c4fa4
..
510456c
100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-64,7
+64,12
@@
static char *parse_value(void)
case 'n':
c = '\n';
break;
- return NULL;
+ /* Some characters escape as themselves */
+ case '\\': case '"':
+ break;
+ /* Reject unknown escape sequences */
+ default:
+ return NULL;
}
value[len++] = c;
continue;