diff --git a/src/gui/official/sflphone.pro b/src/gui/official/sflphone.pro index 012fccd72fcab7181b1923933bfe7cbb59f1a39d..9d14b58100109463d6b1721a9f1d56a752f3fd6f 100644 --- a/src/gui/official/sflphone.pro +++ b/src/gui/official/sflphone.pro @@ -5,7 +5,7 @@ TEMPLATE = app TARGET += DEPENDPATH += . -INCLUDEPATH += . +INCLUDEPATH += /usr/lib/qt4/include/Qt/ QT += network #CONFIG += debug diff --git a/src/gui/server/requestfactory.cpp b/src/gui/server/requestfactory.cpp index 51d0954ea7f9e3d27893bc2f26499d2b02796d5a..56c444001235917028a5c821bdcaa6d8d7dcb75c 100644 --- a/src/gui/server/requestfactory.cpp +++ b/src/gui/server/requestfactory.cpp @@ -37,7 +37,7 @@ RequestFactory::create(const std::string& requestLine) iter = tList.begin(); // there is atleast a second token (the sequenceId) - if (iter != tList.end() && iter->find("seq") == 0 ) { + if (iter != tList.end() && iter->size() != 0 ) { std::string sequenceId = *iter; tList.pop_front(); try { diff --git a/src/sipvoiplink.cpp b/src/sipvoiplink.cpp index 7a14441ba0f5121667fb50354041c9d45617ef15..ae081999aaa527105d4daa19ea0820a8c9275dad 100644 --- a/src/sipvoiplink.cpp +++ b/src/sipvoiplink.cpp @@ -556,6 +556,22 @@ SipVoIPLink::getEvent (void) switch (event->type) { // IP-Phone user receives a new call case EXOSIP_CALL_INVITE: // + // TODO: remove this hack, when there is no + // buffer overflow in event->request->bodies->body... + if (event->request!=NULL && event->request->bodies!=NULL) { + if (!osip_list_eol (event->request->bodies, 0)) { + osip_body_t* t = (osip_body_t *)osip_list_get (event->request->bodies, 0); + if (t!=NULL && t->body!=NULL) { + char *lastnewline = strrchr(t->body, '\n'); + if (lastnewline != NULL ) { + lastnewline++; + if (*lastnewline != '\0') { + _debug("EXOSIP_CALL_INVITE: request error patched\n"); } + *lastnewline = '\0'; + } + } + } + } // Set local random port for incoming call if (!Manager::instance().useStun()) { setLocalPort(RANDOM_LOCAL_PORT);