|
|
|
|
@ -12,7 +12,7 @@
|
|
|
|
|
+include ../../Makefile.modules
|
|
|
|
|
--- /dev/null
|
|
|
|
|
+++ b/modules/tcap/tcap_mod.c
|
|
|
|
|
@@ -0,0 +1,129 @@
|
|
|
|
|
@@ -0,0 +1,128 @@
|
|
|
|
|
+#include <stdio.h>
|
|
|
|
|
+#include <stdlib.h>
|
|
|
|
|
+#include <unistd.h>
|
|
|
|
|
@ -103,10 +103,9 @@
|
|
|
|
|
+ err = "No Content-Type found";
|
|
|
|
|
+ if (!msg->content_type)
|
|
|
|
|
+ goto error;
|
|
|
|
|
+ err = "Truncated SIP packet";
|
|
|
|
|
+ err = "Content-Type mismatch";
|
|
|
|
|
+ if (msg->content_type->body.len < content_type.len)
|
|
|
|
|
+ goto error;
|
|
|
|
|
+ err = "Content-Type mismatch";
|
|
|
|
|
+ if (strncasecmp(msg->content_type->body.s, content_type.s, content_type.len))
|
|
|
|
|
+ goto error;
|
|
|
|
|
+
|
|
|
|
|
|