diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-02-24 13:46:54 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-02-24 13:46:54 +0000 |
commit | 38fefdf005d8237391f4aabfb145c4a96d930b8b (patch) | |
tree | 3140d1ac71c9d4d0d8ed643bc9937302d4cf9379 /strings.c | |
parent | c8bf126a0b893c247fa4ec7b271fa51308fe257f (diff) | |
download | mandoc-38fefdf005d8237391f4aabfb145c4a96d930b8b.tar.gz |
Character-encoding checked for all text (arguments/values).
Diffstat (limited to 'strings.c')
-rw-r--r-- | strings.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -55,14 +55,16 @@ mdoc_isescape(const char *p) /* FALLTHROUGH */ case (' '): /* FALLTHROUGH */ + case ('&'): + /* FALLTHROUGH */ case ('.'): /* FALLTHROUGH */ case ('e'): return(2); case ('('): - if (0 == *++p) + if (0 == *++p || ! isgraph(*p)) return(0); - if (0 == *++p) + if (0 == *++p || ! isgraph(*p)) return(0); return(4); case ('['): @@ -72,7 +74,7 @@ mdoc_isescape(const char *p) } for (c = 3, p++; *p && ']' != *p; p++, c++) - if (isspace(*p)) + if ( ! isgraph(*p)) break; return(*p == ']' ? c : 0); |