summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e5df1a)
raw | patch | inline | side by side (parent: 7e5df1a)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 27 Sep 2007 10:25:14 +0000 (12:25 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 27 Sep 2007 10:33:03 +0000 (12:33 +0200) |
A '\0' might have been written above the buffer array bounds.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/perl.c | patch | blob | history |
diff --git a/src/perl.c b/src/perl.c
index 1ad72487cc329c487eef65cc65837edee74bfc31..f2cb7b6687a40ced37e5f05572cdf07c563e5b1f 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
status = snprintf (buf, buf_len, "%s::%s", base_name, module);
if ((status < 0) || (status >= buf_len))
return (NULL);
- buf[buf_len] = '\0';
+ buf[buf_len - 1] = '\0';
return (buf);
} /* char *get_module_name */