- \0 termination of read SIP telegram from line

This commit is contained in:
Thomas Ries
2003-09-22 23:29:44 +00:00
parent 196e6efe6d
commit 0ba57c0e9b
4 changed files with 21 additions and 5 deletions
+4
View File
@@ -1,3 +1,7 @@
0.3.7
=====
22-Sep-2003: - \0 termination of read SIP telegram from line
0.3.6
=====
22-Sep-2003: - released 0.3.6
+8 -1
View File
@@ -60,9 +60,16 @@ Known bugs:
-----
md5sum for siproxd-0.3.6.tar.gz:
md5sum for siproxd-0.3.6.tar.gz: 2f17fcb5d13844ee75359dbe12d34e55
GnuPG signature for siproxd-0.3.6.tar.gz archive:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQA/b109CfzBioe83JQRAuXAAJwMLqgvdVwUCph0941ybGysJwnquwCeMnlK
yH2kTVVq6cIRqG+TtgbY7M4=
=h9bM
-----END PGP SIGNATURE-----
GnuPG: pub 1024D/87BCDC94 2000-03-19 Thomas Ries <tries@gmx.net>
+1 -1
View File
@@ -30,7 +30,7 @@ dnl Release Version
dnl
SPD_MAJOR_VERSION=0
SPD_MINOR_VERSION=3
SPD_MICRO_VERSION=6
SPD_MICRO_VERSION=7
SPD_VERSION=$SPD_MAJOR_VERSION.$SPD_MINOR_VERSION.$SPD_MICRO_VERSION
+8 -3
View File
@@ -191,13 +191,14 @@ INFO("daemonizing done (pid=%i)", getpid());
/* got input, process */
DEBUGC(DBCLASS_BABBLE,"back from sip_wait");
i=sipsock_read(&buff, sizeof(buff), &from);
i=sipsock_read(&buff, sizeof(buff)-1, &from);
buff[i]='\0';
#ifdef MOREDEBUG /*&&&&*/
{char tmp[32];
strncpy(tmp, buff, 30);
tmp[30]='\0';
INFO("got packet from %s [%s]", inet_ntoa(from.sin_addr), tmp);}
INFO("got packet [%i bytes]from %s [%s]", i, inet_ntoa(from.sin_addr), tmp);}
#endif
/* evaluate the access lists (IP based filter)*/
access=accesslist_check(from);
@@ -225,7 +226,11 @@ INFO("got packet from %s [%s]", inet_ntoa(from.sin_addr), tmp);}
/* integrity checks - parsed buffer*/
sts=security_check_sip(my_msg);
if (sts != STS_SUCCESS) continue; /* there are no resources to free */
if (sts != STS_SUCCESS) {
ERROR("security_check_sip() failed... this is not good");
DUMP_BUFFER(-1, buff, i);
goto end_loop; /* skip and free resources */
}
DEBUGC(DBCLASS_SIP,"received SIP type %s:%s",
(MSG_IS_REQUEST(my_msg))? "REQ" : "RES",