Discussion to talk about software related topics only.
-
SeeCwriter
- Posts: 630
- Joined: Mon May 12, 2008 10:55 am
Post
by SeeCwriter »
I'm trying to read SNMP community strings. But the function I wrote crashes.(MOD5441X)
Code: Select all
char *GetReadOnlyCommunityString( char *p )
{
const SysInfo *pInfo = GetSysInfo();
strncpy( p, (char *)pInfo->ReadCommunity, 40 );
*(p+40) = NUL;
return p;
}
What am I doing wrong?
v2.7.5 NNDK.
-
SeeCwriter
- Posts: 630
- Joined: Mon May 12, 2008 10:55 am
Post
by SeeCwriter »
Never mind. Buffer overflow. Doomkoff!
-
dciliske
- Posts: 624
- Joined: Mon Feb 06, 2012 9:37 am
- Location: San Diego, CA
-
Contact:
Post
by dciliske »
That was the question I thought to ask, but was like "Nah... Surely he checked that, must be some weird esoteric SNMP thing". XD
I tend to stay away from SNMP lest the abyss start staring back. Lord knows I get that enough with TLS.
Dan Ciliske
Project Engineer
Netburner, Inc