summaryrefslogtreecommitdiff
path: root/include.c
diff options
context:
space:
mode:
Diffstat (limited to 'include.c')
-rw-r--r--include.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/include.c b/include.c
index 8eb6a52..159dfc7 100644
--- a/include.c
+++ b/include.c
@@ -50,7 +50,7 @@ issymbolic(const char *dir, const char *component)
struct stat st;
char buf[ BUFSIZ ], **pp;
- sprintf(buf, "%s%s%s", dir, *dir ? "/" : "", component);
+ snprintf(buf, sizeof(buf), "%s%s%s", dir, *dir ? "/" : "", component);
for (pp=notdotdot; *pp; pp++)
if (strcmp(*pp, buf) == 0)
return (TRUE);
@@ -292,7 +292,7 @@ inc_path(const char *file, const char *include, int type)
pp = includedirsnext;
for (; *pp; pp++) {
- sprintf(path, "%s/%s", *pp, include);
+ snprintf(path, sizeof(path), "%s/%s", *pp, include);
remove_dotdot(path);
if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) {
includedirsnext = pp + 1;