diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-15 16:23:51 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-15 16:23:51 +0000 |
commit | 792762cbb772aaf51b391b8c492fc1285528dd88 (patch) | |
tree | 8886ac7ff1741e71906364d4357fc63ce7f6e2b6 /tbl_data.c | |
parent | 87d72e07e9c7935f4db2f36c4fc32716cd34b865 (diff) | |
download | mandoc-792762cbb772aaf51b391b8c492fc1285528dd88.tar.gz |
Make lint shut up a little bit.
Diffstat (limited to 'tbl_data.c')
-rw-r--r-- | tbl_data.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -106,8 +106,10 @@ data(struct tbl_node *tbl, struct tbl_span *dp, return(0); } - dat->string = mandoc_malloc(*pos - sv + 1); - memcpy(dat->string, &p[sv], *pos - sv); + assert(*pos - sv >= 0); + + dat->string = mandoc_malloc((size_t)(*pos - sv + 1)); + memcpy(dat->string, &p[sv], (size_t)(*pos - sv)); dat->string[*pos - sv] = '\0'; if (p[*pos]) |