From: Lennart Poettering Date: Mon, 3 Oct 2005 23:37:13 +0000 (+0000) Subject: ### BACKPORT ### X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=0687ca71bb72a15ced88a511a2df7c2379475194;p=catta ### BACKPORT ### Yet another one of those useless-assert bugs: Actually allow browsing for registration domains git-svn-id: file:///home/lennart/svn/public/avahi/trunk@691 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-core/browse-domain.c b/avahi-core/browse-domain.c index 6cbc93a..2cb2f75 100644 --- a/avahi-core/browse-domain.c +++ b/avahi-core/browse-domain.c @@ -82,7 +82,11 @@ AvahiSDomainBrowser *avahi_s_domain_browser_new( assert(server); assert(callback); - assert(type >= AVAHI_DOMAIN_BROWSER_BROWSE && type <= AVAHI_DOMAIN_BROWSER_BROWSE_LEGACY); + + if (type >= AVAHI_DOMAIN_BROWSER_MAX) { + avahi_server_set_errno(server, AVAHI_ERR_INVALID_FLAGS); + return NULL; + } if (!AVAHI_IF_VALID(interface)) { avahi_server_set_errno(server, AVAHI_ERR_INVALID_INTERFACE);