Hello, all!

Wes Hardaker wrote:
> I'm not sure how I think about removing the forward encoding...  I'll
> have to think about it.  One ramification is that if we remove the
> generic BER routines, there could be applications that still make use of
> the forwarding encoding ones (why they're using us for those functions
> is a good question, however).
> 
> (I was the one that designed the reverse encoding because I thought the
> forwarding encoding wasn't the best way forward, but having said that
> I'm still nervous about removing the forward.  But I couldn't tell you
> why :-)
The forward asn encoding is not finished.
It doesn't support memory reallocation.
If someone query snmpset with 128 variables,
there can appear problem - buffer overflow.
Sequence:
snmp_synch_response() in snmp_client.c called from snmpset.c ->
snmp_synch_response_cb() in snmp_client.c ->
snmp_send() in snmp_api.c ->
snmp_async_send() in snmp_api.c ->
snmp_sess_async_send() in snmp_api.c ->
_sess_async_send() in snmp_api.c :
...
    /*
     * check to see if we need to create a v3 user from the session info
     */
    if (create_user_from_session(session) != SNMPERR_SUCCESS) {
        session->s_snmp_errno = SNMPERR_UNKNOWN_USER_NAME;  /* XX?? */
        DEBUGMSGTL(("snmp_api",
                    "snmp_send(): failed(2) to create a new user from 
session\n"));
        return 0;
    }
---------------------------------- 2048 - size of buffer can be small.
    if ((pktbuf = (u_char *)malloc(2048)) == NULL) {
        DEBUGMSGTL(("sess_async_send",
                    "couldn't malloc initial packet buffer\n"));
        session->s_snmp_errno = SNMPERR_MALLOC;
        return 0;
    } else {
-------------------- size is small...
        pktbuf_len = 2048;
    }

#if TEMPORARILY_DISABLED
...

Aleksandr Lomanov
ICQ: 170411676

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to