diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-05 09:55:04 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-05 09:55:04 -0800 |
commit | 3a28a2a0146c4979281ffea641dede9a32df08f9 (patch) | |
tree | 268539a149b5fa1dd582dfb35116b5b5b38b5a07 /include.c | |
parent | 639071ff3446b0df53078be1ff5820c812313aa7 (diff) | |
download | xorg-util-makedepend-3a28a2a0146c4979281ffea641dede9a32df08f9.tar.gz |
Convert more sprintf calls to snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'include.c')
-rw-r--r-- | include.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |