version 1.209, 2014/04/23 16:08:33 |
version 1.211, 2014/06/29 21:20:31 |
Line 1938 roff_so(ROFF_ARGS) |
|
Line 1938 roff_so(ROFF_ARGS) |
|
{ |
{ |
char *name; |
char *name; |
|
|
mandoc_msg(MANDOCERR_SO, r->parse, ln, ppos, NULL); |
name = *bufp + pos; |
|
mandoc_vmsg(MANDOCERR_SO, r->parse, ln, ppos, ".so %s", name); |
|
|
/* |
/* |
* Handle `so'. Be EXTREMELY careful, as we shouldn't be |
* Handle `so'. Be EXTREMELY careful, as we shouldn't be |
Line 1947 roff_so(ROFF_ARGS) |
|
Line 1948 roff_so(ROFF_ARGS) |
|
* or using absolute paths. |
* or using absolute paths. |
*/ |
*/ |
|
|
name = *bufp + pos; |
|
if ('/' == *name || strstr(name, "../") || strstr(name, "/..")) { |
if ('/' == *name || strstr(name, "../") || strstr(name, "/..")) { |
mandoc_msg(MANDOCERR_SOPATH, r->parse, ln, pos, NULL); |
mandoc_vmsg(MANDOCERR_SO_PATH, r->parse, ln, ppos, |
|
".so %s", name); |
return(ROFF_ERR); |
return(ROFF_ERR); |
} |
} |
|
|
Line 2067 roff_setstrn(struct roffkv **r, const char *name, size |
|
Line 2068 roff_setstrn(struct roffkv **r, const char *name, size |
|
/* Search for an existing string with the same name. */ |
/* Search for an existing string with the same name. */ |
n = *r; |
n = *r; |
|
|
while (n && strcmp(name, n->key.p)) |
while (n && (namesz != n->key.sz || |
|
strncmp(n->key.p, name, namesz))) |
n = n->next; |
n = n->next; |
|
|
if (NULL == n) { |
if (NULL == n) { |