aboutsummaryrefslogtreecommitdiff
path: root/src/regex
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-11-29 22:26:21 +0100
committerChristian Grothoff <christian@grothoff.org>2018-11-29 22:26:21 +0100
commite871f8368c8a1f0867f68f656875e4c37c26f298 (patch)
treec2aa6a2b40213d695e8f047a51695563f44d74b8 /src/regex
parentf8bccfbb602bdbed4bcc00fd3c6c3a00add82416 (diff)
downloadgnunet-e871f8368c8a1f0867f68f656875e4c37c26f298.tar.gz
gnunet-e871f8368c8a1f0867f68f656875e4c37c26f298.zip
finish (?) libgnunetatstransport for now
Diffstat (limited to 'src/regex')
-rw-r--r--src/regex/gnunet-service-regex.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/regex/gnunet-service-regex.c b/src/regex/gnunet-service-regex.c
index eb10e7c07..9b9cad231 100644
--- a/src/regex/gnunet-service-regex.c
+++ b/src/regex/gnunet-service-regex.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
@@ -131,16 +131,8 @@ check_announce (void *cls,
131 const struct AnnounceMessage *am) 131 const struct AnnounceMessage *am)
132{ 132{
133 struct ClientEntry *ce = cls; 133 struct ClientEntry *ce = cls;
134 const char *regex;
135 uint16_t size;
136 134
137 size = ntohs (am->header.size) - sizeof (*am); 135 GNUNET_MQ_check_zero_termination (am);
138 regex = (const char *) &am[1];
139 if ('\0' != regex[size - 1])
140 {
141 GNUNET_break (0);
142 return GNUNET_SYSERR;
143 }
144 if (NULL != ce->ah) 136 if (NULL != ce->ah)
145 { 137 {
146 /* only one announcement per client allowed */ 138 /* only one announcement per client allowed */