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