To capture local device adapter(PCAP_SRC_IFLOCAL), source is "\Device\NPF......".
But as I think, it is important checking source NULL in pcap_open() function.
From: "lee kyung moon" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [WinPcap-users] pcap_open bug in 3.0a Date: Tue, 29 Jul 2003 09:02:18 +0000
Here is a source code of "pcap_open".
To capture local device adapter(PCAP_SRC_IFLOCAL), source must be NULL.
But it is possible to occur access violation error when source is NULL.
I wish it would be checked if source is NULL before call "strlen(source)".
Thank you.
pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
{
char host[PCAP_BUF_SIZE], port[PCAP_BUF_SIZE], name[PCAP_BUF_SIZE];
int type;
pcap_t *fp;
if (strlen(source) > PCAP_BUF_SIZE)
{
snprintf(errbuf, PCAP_ERRBUF_SIZE, "The source string is too long. Cannot handle it correctly.");
return NULL;
}
...
}
_________________________________________________________________
확인하자. 오늘의 운세 무료 사주, 궁합, 작명, 전생 가이드 http://www.msn.co.kr/fortune/default.asp
================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe use mailto: [EMAIL PROTECTED]
==================================================================
_________________________________________________________________
행운의 주인공이 이번엔 나일꺼야, 진짜루... 인터넷 복권 http://www.msn.co.kr/money/interlotto/
================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe use mailto: [EMAIL PROTECTED]
==================================================================
