From: David van Moolenbroek Date: Fri, 7 Jan 2011 17:07:46 +0000 (+0000) Subject: DS: fix regression in ds_subscribe regex construction X-Git-Tag: v3.2.0~706 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=410699874cc6be48a1ad1411a4da436b2ce9ca10;p=minix.git DS: fix regression in ds_subscribe regex construction --- diff --git a/servers/ds/store.c b/servers/ds/store.c index fd4c27521..3b7e06f1e 100644 --- a/servers/ds/store.c +++ b/servers/ds/store.c @@ -519,7 +519,7 @@ PUBLIC int do_retrieve_label(const message *m_ptr) *===========================================================================*/ PUBLIC int do_subscribe(message *m_ptr) { - char regex[DS_MAX_KEYLEN+3]; + char regex[DS_MAX_KEYLEN+2]; struct subscription *subp; char errbuf[80]; char *owner; @@ -546,9 +546,8 @@ PUBLIC int do_subscribe(message *m_ptr) * and the usual case is for a complete match. */ regex[0] = '^'; - if((r = get_key_name(m_ptr, regex)) != OK) + if((r = get_key_name(m_ptr, regex+1)) != OK) return r; - regex[DS_MAX_KEYLEN-1] = '\0'; strcat(regex, "$"); /* Compile regular expression. */