Menu

#2927 net-snmp: compile fail when configure with --disable-des

linux
closed
nobody
None
5
2019-04-15
2019-02-26
No

Fix for:

| scapi.c: In function 'sc_encrypt':
| scapi.c:1256:5: error: 'pad_size' undeclared (first use in this function); did you mean 'dysize'?
| pad_size = pai->pad_size;
| ^~~~~~~~
| dysize

pad_size is defined only without --disable-des
[snip]

ifndef NETSNMP_DISABLE_DES

int             pad, plast, pad_size = 0;

but used when disable-des,
[snip]
QUITFUN(SNMPERR_GENERR, sc_encrypt_quit);
}
pad_size = pai->pad_size;

memset(my_iv, 0, sizeof(my_iv));

ifndef NETSNMP_DISABLE_DES

if (USM_CREATE_USER_PRIV_DES == (pai->type & USM_PRIV_MASK_ALG)) {

    /*

fix by move it into #ifndef NETSNMP_DISABLE_DES

1 Attachments

Discussion

  • Bart Van Assche

    Bart Van Assche - 2019-04-15

    This patch has been applied on the v5.8 and master branches. Thanks for the patch!

     
  • Bart Van Assche

    Bart Van Assche - 2019-04-15
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB