summaryrefslogtreecommitdiffstats
path: root/mandoc-db.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-05-12 23:44:51 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-05-12 23:44:51 +0000
commit6ddcf3e3cb3441d3b3a0b2bc21495061a4e81291 (patch)
treed0bb0500f28abe70db920e385b4c6b5bf3a1ad1b /mandoc-db.c
parent52d7310046ed681359f13df2dcc2b69c190b959f (diff)
downloadmandoc-6ddcf3e3cb3441d3b3a0b2bc21495061a4e81291.tar.gz
Correctly catch `Vt' semicolon in mandoc-db.
Diffstat (limited to 'mandoc-db.c')
-rw-r--r--mandoc-db.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mandoc-db.c b/mandoc-db.c
index 6a52e504..c7128af5 100644
--- a/mandoc-db.c
+++ b/mandoc-db.c
@@ -591,7 +591,8 @@ pmdoc_Fd(MDOC_ARGS)
if ('>' == *end || '"' == *end)
end--;
- dbt_appendb(key, ksz, start, end - start + 1);
+ assert(end >= start);
+ dbt_appendb(key, ksz, start, (size_t)(end - start + 1));
dbt_appendb(key, ksz, "", 1);
fl = MANDOC_INCLUDES;
@@ -702,7 +703,7 @@ pmdoc_Vt(MDOC_ARGS)
if (0 == (sz = strlen(start)))
return;
- if (';' == start[sz - 1])
+ if (';' == start[(int)sz - 1])
sz--;
if (0 == sz)