$NetBSD: patch-CVE-2023-38470,v 1.1 2025/02/26 11:43:05 nia Exp $

[PATCH] Ensure each label is at least one byte long

The only allowed exception is single dot, where it should return empty
string.

Fixes #454.

https://github.com/avahi/avahi/commit/94cb6489114636940ac683515417990b55b5d66c.patch

--- avahi-common/domain.c.orig	2015-04-01 04:58:14.145727222 +0000
+++ avahi-common/domain.c
@@ -201,7 +201,7 @@ char *avahi_normalize_name(const char *s
         }
 
         if (!empty) {
-            if (size < 1)
+            if (size < 2)
                 return NULL;
 
             *(r++) = '.';
