]> git.meshlink.io Git - catta/commitdiff
add an utf8 check when unescaping domains - essentially this means that all domain...
authorLennart Poettering <lennart@poettering.net>
Mon, 24 Apr 2006 21:52:34 +0000 (21:52 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Apr 2006 21:52:34 +0000 (21:52 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1202 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-common/domain.c

index 1ac8577531b25aa2269de5adef40cff85188397f..8d339c7a487b2a6ddecb9103f7038f10f2f7131b 100644 (file)
@@ -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;
 }