X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-common%2Fdomain.c;h=8d339c7a487b2a6ddecb9103f7038f10f2f7131b;hb=4762665d22b1e3097b537e9a5e27d2f2b0bfcfde;hp=1ac8577531b25aa2269de5adef40cff85188397f;hpb=4d4577c5a953e9b462cffe9a5d3ead122b7bbe42;p=catta diff --git a/avahi-common/domain.c b/avahi-common/domain.c index 1ac8577..8d339c7 100644 --- a/avahi-common/domain.c +++ b/avahi-common/domain.c @@ -37,6 +37,7 @@ #include "malloc.h" #include "error.h" #include "address.h" +#include "utf8.h" /* Read the first label from string *name, unescape "\" and write it to dest */ char *avahi_unescape_label(const char **name, char *dest, size_t size) { @@ -107,6 +108,9 @@ char *avahi_unescape_label(const char **name, char *dest, size_t size) { *d = 0; + if (!avahi_utf8_valid(dest)) + return NULL; + return dest; }