* [PATCH] passt-repair: Fix build with -Werror=format-security
@ 2025-03-18 19:57 Stefano Brivio
2025-03-19 0:36 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Stefano Brivio @ 2025-03-18 19:57 UTC (permalink / raw)
To: passt-dev
Fixes: 04701702471e ("passt-repair: Add directory watch")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
Note: I just pushed this for my own sanity, as it's trivial and builds
are otherwise broken on CentOS Stream / RHEL. I'm posting for review
anyway in the unlikely case something can ever be wrong with this.
passt-repair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/passt-repair.c b/passt-repair.c
index 8bb3f00..120f7aa 100644
--- a/passt-repair.c
+++ b/passt-repair.c
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
_exit(1);
}
- ret = snprintf(a.sun_path, sizeof(a.sun_path), path);
+ ret = snprintf(a.sun_path, sizeof(a.sun_path), "%s", path);
inotify_dir = true;
} else {
ret = snprintf(a.sun_path, sizeof(a.sun_path), "%s", argv[1]);
--
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
_exit(1);
}
- ret = snprintf(a.sun_path, sizeof(a.sun_path), path);
+ ret = snprintf(a.sun_path, sizeof(a.sun_path), "%s", path);
inotify_dir = true;
} else {
ret = snprintf(a.sun_path, sizeof(a.sun_path), "%s", argv[1]);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] passt-repair: Fix build with -Werror=format-security
2025-03-18 19:57 [PATCH] passt-repair: Fix build with -Werror=format-security Stefano Brivio
@ 2025-03-19 0:36 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2025-03-19 0:36 UTC (permalink / raw)
To: Stefano Brivio; +Cc: passt-dev
[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]
On Tue, Mar 18, 2025 at 08:57:45PM +0100, Stefano Brivio wrote:
> Fixes: 04701702471e ("passt-repair: Add directory watch")
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> Note: I just pushed this for my own sanity, as it's trivial and builds
> are otherwise broken on CentOS Stream / RHEL. I'm posting for review
> anyway in the unlikely case something can ever be wrong with this.
Looks like a good idea. Wonder if it's a good idea to turn on
-Wformat-security for upstream builds.
>
> passt-repair.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/passt-repair.c b/passt-repair.c
> index 8bb3f00..120f7aa 100644
> --- a/passt-repair.c
> +++ b/passt-repair.c
> @@ -150,7 +150,7 @@ int main(int argc, char **argv)
> _exit(1);
> }
>
> - ret = snprintf(a.sun_path, sizeof(a.sun_path), path);
> + ret = snprintf(a.sun_path, sizeof(a.sun_path), "%s", path);
> inotify_dir = true;
> } else {
> ret = snprintf(a.sun_path, sizeof(a.sun_path), "%s", argv[1]);
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-19 0:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-18 19:57 [PATCH] passt-repair: Fix build with -Werror=format-security Stefano Brivio
2025-03-19 0:36 ` David Gibson
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).