Signed-off-by: Alan Coopersmith <[email protected]>
---
util/makestrs.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/util/makestrs.c b/util/makestrs.c
index 7853f87..f872ec8 100644
--- a/util/makestrs.c
+++ b/util/makestrs.c
@@ -102,9 +102,7 @@ static FILE *ifopen(const char *file, const char *mode)
if (buffer == NULL)
return NULL;
- strcpy(buffer, includedir);
- strcat(buffer, "/");
- strcat(buffer, file);
+ snprintf(buffer, len + 1, "%s/%s", includedir, file);
ret = fopen(buffer, mode);
@@ -580,8 +578,7 @@ static void DoLine(char *buf)
else
right = buf + 1;
if (buf[0] == 'H') {
- strcpy (lbuf, prefixstr);
- strcat (lbuf, right);
+ snprintf (lbuf, sizeof(lbuf), "%s%s", prefixstr, right);
right = lbuf;
}
--
1.7.9.2
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel