Re: how to store val.string

Robert Story <[email protected]>
Newsgroups gmane.network.net-snmp.devel,gmane.network.net-snmp.user
Message-ID <[email protected]>
On Fri, 4 May 2018 15:03:48 +0530 Deepak wrote:
DS>     int ret; char str_pwd[4]="";
DS>        .
DS>         case MODE_SET_COMMIT:
DS>         str_ pwd=*(requests->requestvb->val.string);

You are assigning a pointer to a character array. Just pass
val.string to write() directly. Of course, this assumes you've
properly validated it in an earlier stage.

Robert

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.