From 22ff51ee64b2d7ab2ef16d34742d1d8920bfe209 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Wed, 23 Dec 2009 15:45:30 +0000 Subject: [PATCH] qemu-nbd: fix OpenBSD linker warning Signed-off-by: Blue Swirl --- qemu-nbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 91ea01414d..6707ea5cac 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -353,7 +353,8 @@ int main(int argc, char **argv) } if (socket == NULL) { - sprintf(sockpath, SOCKET_PATH, basename(device)); + snprintf(sockpath, sizeof(sockpath), SOCKET_PATH, + basename(device)); socket = sockpath; }