Changeset 1264

Show
Ignore:
Timestamp:
05/12/07 12:29:49 (1 year ago)
Author:
common
Message:

nepenthes

  • sqlhandler-postgres fix the options
  • submit-norman use a captchaless url for norman
  • SocketManager? adding sockets during send or recv increases the .size() of m_Sockets, therefore the pollfd set is read beyond its borders, prevent this
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/modules/sqlhandler-postgres/sqlhandler-postgres.cpp

    r904 r1264  
    762762        "' password = '" + m_PGPass +"'"; 
    763763 
    764         if (m_PGOptions.size() > 0
    765       ConnectString += m_PGOptions; 
     764        if ( m_PGOptions.size() > 0
     765              ConnectString += m_PGOptions; 
    766766         
    767767 
  • nepenthes/trunk/modules/submit-norman/submit-norman.conf.dist

    r674 r1264  
    22{ 
    33        // this is the adress where norman sandbox reports will be sent 
    4         email   "malware@mac.com"; 
    5         urls    ("http://sandbox.norman.no/live_4.html", 
     4        email   "nsbx@mwcollect.org"; 
     5        urls    ("http://www.norman.com/microsites/nsic/Submit/Special/45773/", 
    66                 "http://luigi.informatik.uni-mannheim.de/submit.php?action=verify"); 
    77 
  • nepenthes/trunk/nepenthes-core/src/SocketManager.cpp

    r615 r1264  
    274274        } 
    275275 
     276        int32_t socketcounter, socketmax; 
     277        socketcounter=0; 
     278        socketmax = m_Sockets.size(); 
     279 
    276280        int32_t iPollRet = poll(polls,i,50); 
    277281 
     
    280284                // read sockets 
    281285                i=0; 
    282                 for (itSocket = m_Sockets.begin();itSocket != m_Sockets.end(); itSocket++) 
     286                for (itSocket = m_Sockets.begin();itSocket != m_Sockets.end(), socketcounter < socketmax ; itSocket++, socketcounter++) 
    283287                { 
    284288                        if ( (*itSocket)->isPolled() == true ) 
     
    304308                // write sockets 
    305309                i=0; 
    306                 for (itSocket = m_Sockets.begin();itSocket != m_Sockets.end(); itSocket++) 
     310                socketcounter=0; 
     311                for (itSocket = m_Sockets.begin();itSocket != m_Sockets.end(), socketcounter < socketmax; itSocket++, socketcounter++) 
    307312                { 
    308313                        if ( (*itSocket)->isPolled() == true ) 
     
    332337                // accept new, non udp clients as udp does not accept() 
    333338                i=0; 
    334                 for (itSocket = m_Sockets.begin();itSocket != m_Sockets.end(); itSocket++) 
     339                socketcounter=0; 
     340                for (itSocket = m_Sockets.begin();itSocket != m_Sockets.end(), socketcounter < socketmax; itSocket++, socketcounter++) 
    335341                { 
    336342