]> git.itanic.dy.fi Git - rrdd/blobdiff - rrdtool.c
Replace strncat with _strlcat
[rrdd] / rrdtool.c
index d1e85f4c1d398750ed25d81ad7ee15866f68ad85..98844c596af11ed0d9dc5061d11507a996a2950e 100644 (file)
--- a/rrdtool.c
+++ b/rrdtool.c
@@ -50,8 +50,7 @@ int rrdtool_draw_image(struct rrd_image *image)
        tmpfile[0] = 0;
        tmp[0] = 0;
        strncpy(tmpfile, image->image_filename, sizeof(tmpfile) - 1);
-       strncat(tmpfile, ".tmp",
-               sizeof(tmpfile) - strlen(image->image_filename) - 1);
+       _strlcat(tmpfile, ".tmp", sizeof(tmpfile));
 
        if (image->updatestr)
                updatestr = image->updatestr;