summaryrefslogtreecommitdiff
path: root/mimetypes/prloc.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2018-01-13 12:45:55 +0100
committerSergey Poznyakoff <gray@gnu.org.ua>2018-01-13 12:45:55 +0100
commitd2765b90ce67a26db4ff980842f0a0f3dc37d546 (patch)
treed2f8f20a06a5bfe27fc2e76bdef7324bad07c6f0 /mimetypes/prloc.c
parent0a7b600cc7903de58177499f699c25e0ae34369f (diff)
downloadfileserv-d2765b90ce67a26db4ff980842f0a0f3dc37d546.tar.gz
fileserv-d2765b90ce67a26db4ff980842f0a0f3dc37d546.tar.bz2
Bugfixes
* mimetypes/err.c (print_locus_range): Fix output length. * mimetypes/grammar.y (rule_line): Initialize locus range. * mimetypes/prloc.c (locus_range_format): Fix memory overrun; terminate output with null byte. * src/fileserv.c: New option -i (index page).
Diffstat (limited to 'mimetypes/prloc.c')
-rw-r--r--mimetypes/prloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mimetypes/prloc.c b/mimetypes/prloc.c
index d53883c..4555a56 100644
--- a/mimetypes/prloc.c
+++ b/mimetypes/prloc.c
@@ -150,7 +150,6 @@ locus_range_format (char **pbuf, size_t *psize, struct locus_range const *lr)
*psize = size;
}
n = _lpprint (buf, &lr->beg, PR_ALL);
- buf += n;
if (lr->end.file)
{
int flag = PR_NON;
@@ -168,5 +167,6 @@ locus_range_format (char **pbuf, size_t *psize, struct locus_range const *lr)
n += _lpprint (buf + n, &lr->end, flag);
}
}
+ buf[n] = 0;
return n;
}

Return to:

Send suggestions and report system problems to the System administrator.