diff options
Diffstat (limited to 'parsing.c')
| -rw-r--r-- | parsing.c | 3 | 
1 files changed, 1 insertions, 2 deletions
| @@ -63,8 +63,7 @@ static char *substr(const char *head, const char *tail) | |||
| 63 | if (tail < head) | 63 | if (tail < head) | 
| 64 | return xstrdup(""); | 64 | return xstrdup(""); | 
| 65 | buf = xmalloc(tail - head + 1); | 65 | buf = xmalloc(tail - head + 1); | 
| 66 | strncpy(buf, head, tail - head); | 66 | strlcpy(buf, head, tail - head + 1); | 
| 67 | buf[tail - head] = '\0'; | ||
| 68 | return buf; | 67 | return buf; | 
| 69 | } | 68 | } | 
| 70 | 69 | ||
