From 6fa97a1859791cfe39e8f555e1e558744b80fd4c Mon Sep 17 00:00:00 2001 From: Mikel Olasagasti Uranga Date: Tue, 10 Feb 2026 11:12:37 +0100 Subject: [PATCH] avahi: fix missing fflush() in address resolution The function `avahi_resolve_address_with_socket` writes a command to the socket using `fprintf` and immediately attempts to read the response using `fgets`. Fixes downstream report detected using static analyzers rhbz#2362872. Signed-off-by: Mikel Olasagasti Uranga --- src/avahi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/avahi.c b/src/avahi.c index 6ef3d80..51a8de7 100644 --- a/src/avahi.c +++ b/src/avahi.c @@ -136,6 +136,7 @@ avahi_resolve_address_with_socket(FILE* f, int af, const void* data, char* name, char a[256], ln[256]; fprintf(f, "RESOLVE-ADDRESS %s\n", inet_ntop(af, data, a, sizeof(a))); + fflush(f); if (!(fgets(ln, sizeof(ln), f))) { return AVAHI_RESOLVE_RESULT_UNAVAIL;