components/net-snmp/patches/051.19616471.patch
branchs11u2-sru
changeset 3450 3b2640ec70f8
equal deleted inserted replaced
3449:e5342aff5cc4 3450:3b2640ec70f8
       
     1 http://sourceforge.net/p/net-snmp/code/ci/76e8d6d100320629d8a23be4b0128619600c919d/
       
     2 https://security-tracker.debian.org/tracker/CVE-2014-2285
       
     3 
       
     4 diff --git a/perl/TrapReceiver/TrapReceiver.xs b/perl/TrapReceiver/TrapReceiver.xs
       
     5 index d4ccac9..0ab1a81 100644
       
     6 --- a/perl/TrapReceiver/TrapReceiver.xs
       
     7 +++ b/perl/TrapReceiver/TrapReceiver.xs
       
     8 @@ -73,18 +73,18 @@ int   perl_trapd_handler( netsnmp_pdu           *pdu,
       
     9          STOREPDUi("securitymodel", pdu->securityModel);
       
    10          STOREPDUi("securitylevel", pdu->securityLevel);
       
    11          STOREPDU("contextName",
       
    12 -                 newSVpv(pdu->contextName, pdu->contextNameLen));
       
    13 +                 newSVpv(pdu->contextName ? pdu->contextName : "", pdu->contextNameLen));
       
    14          STOREPDU("contextEngineID",
       
    15 -                 newSVpv(pdu->contextEngineID,
       
    16 +                 newSVpv(pdu->contextEngineID ? (char *) pdu->contextEngineID : "",
       
    17                                      pdu->contextEngineIDLen));
       
    18          STOREPDU("securityEngineID",
       
    19 -                 newSVpv(pdu->securityEngineID,
       
    20 +                 newSVpv(pdu->securityEngineID ? (char *) pdu->securityEngineID : "",
       
    21                                      pdu->securityEngineIDLen));
       
    22          STOREPDU("securityName",
       
    23 -                 newSVpv(pdu->securityName, pdu->securityNameLen));
       
    24 +                 newSVpv(pdu->securityName ? (char *) pdu->securityName : "", pdu->securityNameLen));
       
    25      } else {
       
    26          STOREPDU("community",
       
    27 -                 newSVpv(pdu->community, pdu->community_len));
       
    28 +                 newSVpv(pdu->community ? (char *) pdu->community : "", pdu->community_len));
       
    29      }
       
    30  
       
    31      if (transport && transport->f_fmtaddr) {