Hi there I use net-snmp-5.4, and there's a NULL pointer operator in snmplib/snmp_api.c

void * snmp_sess_pointer(netsnmp_session * session)
{
   struct session_list *slp;

   snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION);
   for (slp = Sessions; slp!=NULL; slp = slp->next) {
       if (slp->session == session) {

/* ^------------------- here for the loop end, slp=NULL then slp->session illegal, or change the for loop to while loop; such as while(slp!=NULL) { xxx; slp=slp->next; } */

           break;
       }
   }

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to