]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
pipesz: use snprintf() instead of sprintf()
authorKarel Zak <kzak@redhat.com>
Tue, 7 Oct 2025 09:58:55 +0000 (11:58 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 7 Oct 2025 09:58:55 +0000 (11:58 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/pipesz.c

index 8a3da8612a06c81bc2b666f67b05251c7b7335b2..5a2c0d02395cf8c0f72eebfb17d13ff3e345b32a 100644 (file)
@@ -140,7 +140,7 @@ static void do_fd(int fd)
 {
        char name[sizeof(stringify(INT_MIN)) + 3];
 
-       sprintf(name, "fd %d", fd);
+       snprintf(name, sizeof(name), "fd %d", fd);
 
        if (opt_get)
                do_get(fd, name);