engines/e_4758cca.c:631: error: NULL_DEREFERENCE
  pointer `keyToken` last assigned on line 622 could be null and is dereferenced at line 631, column 22.
Showing all 29 steps of the trace


engines/e_4758cca.c:610:1: start of procedure cca_rsa_verify()
608.   #   define SSL_SIG_LEN 36
609.   
610. > static int cca_rsa_verify(int type, const unsigned char *m,
611.                             unsigned int m_len, const unsigned char *sigbuf,
612.                             unsigned int siglen, const RSA *rsa)

engines/e_4758cca.c:616:5: 
614.       long returnCode;
615.       long reasonCode;
616. >     long lsiglen = siglen;
617.       long exitDataLength = 0;
618.       unsigned char exitData[8];

engines/e_4758cca.c:617:5: 
615.       long reasonCode;
616.       long lsiglen = siglen;
617. >     long exitDataLength = 0;
618.       unsigned char exitData[8];
619.       long ruleArrayLength = 1;

engines/e_4758cca.c:619:5: 
617.       long exitDataLength = 0;
618.       unsigned char exitData[8];
619. >     long ruleArrayLength = 1;
620.       unsigned char ruleArray[8] = "PKCS-1.1";
621.       long keyTokenLength;

engines/e_4758cca.c:620:5: 
618.       unsigned char exitData[8];
619.       long ruleArrayLength = 1;
620. >     unsigned char ruleArray[8] = "PKCS-1.1";
621.       long keyTokenLength;
622.       unsigned char *keyToken = (unsigned char *)RSA_get_ex_data(rsa, hndidx);

engines/e_4758cca.c:622:5: 
620.       unsigned char ruleArray[8] = "PKCS-1.1";
621.       long keyTokenLength;
622. >     unsigned char *keyToken = (unsigned char *)RSA_get_ex_data(rsa, hndidx);
623.       long length = SSL_SIG_LEN;
624.       long keyLength;

crypto/rsa/rsa_lib.c:278:1: start of procedure RSA_get_ex_data()
  276.   }
  277.   
  278. > void *RSA_get_ex_data(const RSA *r, int idx)
  279.   {
  280.       return (CRYPTO_get_ex_data(&r->ex_data, idx));

crypto/rsa/rsa_lib.c:280:5: 
  278.   void *RSA_get_ex_data(const RSA *r, int idx)
  279.   {
  280. >     return (CRYPTO_get_ex_data(&r->ex_data, idx));
  281.   }
  282.   

crypto/ex_data.c:634:1: start of procedure CRYPTO_get_ex_data()
    632.    * particular index in the class used by this variable
    633.    */
    634. > void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    635.   {
    636.       if (ad->sk == NULL)

crypto/ex_data.c:636:9: Taking false branch
    634.   void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    635.   {
    636.       if (ad->sk == NULL)
                   ^
    637.           return (0);
    638.       else if (idx >= sk_void_num(ad->sk))

crypto/ex_data.c:638:21: Condition is true
    636.       if (ad->sk == NULL)
    637.           return (0);
    638.       else if (idx >= sk_void_num(ad->sk))
                               ^
    639.           return (0);
    640.       else

crypto/ex_data.c:638:14: 
    636.       if (ad->sk == NULL)
    637.           return (0);
    638. >     else if (idx >= sk_void_num(ad->sk))
    639.           return (0);
    640.       else

crypto/stack/stack.c:319:1: start of procedure sk_num()
      317.   }
      318.   
      319. > int sk_num(const _STACK *st)
      320.   {
      321.       if (st == NULL)

crypto/stack/stack.c:321:9: Taking false branch
      319.   int sk_num(const _STACK *st)
      320.   {
      321.       if (st == NULL)
                     ^
      322.           return -1;
      323.       return st->num;

crypto/stack/stack.c:323:5: 
      321.       if (st == NULL)
      322.           return -1;
      323. >     return st->num;
      324.   }
      325.   

crypto/stack/stack.c:324:1: return from a call to sk_num
      322.           return -1;
      323.       return st->num;
      324. > }
      325.   
      326.   void *sk_value(const _STACK *st, int i)

crypto/ex_data.c:638:14: Taking false branch
    636.       if (ad->sk == NULL)
    637.           return (0);
    638.       else if (idx >= sk_void_num(ad->sk))
                        ^
    639.           return (0);
    640.       else

crypto/ex_data.c:641:17: Condition is true
    639.           return (0);
    640.       else
    641.           return (sk_void_value(ad->sk, idx));
                           ^
    642.   }

crypto/ex_data.c:641:9: 
    639.           return (0);
    640.       else
    641. >         return (sk_void_value(ad->sk, idx));
    642.   }

crypto/stack/stack.c:326:1: start of procedure sk_value()
      324.   }
      325.   
      326. > void *sk_value(const _STACK *st, int i)
      327.   {
      328.       if (!st || (i < 0) || (i >= st->num))

crypto/stack/stack.c:328:10: Taking false branch
      326.   void *sk_value(const _STACK *st, int i)
      327.   {
      328.       if (!st || (i < 0) || (i >= st->num))
                      ^
      329.           return NULL;
      330.       return st->data[i];

crypto/stack/stack.c:328:17: Taking true branch
      326.   void *sk_value(const _STACK *st, int i)
      327.   {
      328.       if (!st || (i < 0) || (i >= st->num))
                             ^
      329.           return NULL;
      330.       return st->data[i];

crypto/stack/stack.c:329:9: 
      327.   {
      328.       if (!st || (i < 0) || (i >= st->num))
      329. >         return NULL;
      330.       return st->data[i];
      331.   }

crypto/stack/stack.c:331:1: return from a call to sk_value
      329.           return NULL;
      330.       return st->data[i];
      331. > }
      332.   
      333.   void *sk_set(_STACK *st, int i, void *value)

crypto/ex_data.c:642:1: return from a call to CRYPTO_get_ex_data
    640.       else
    641.           return (sk_void_value(ad->sk, idx));
    642. > }

crypto/rsa/rsa_lib.c:281:1: return from a call to RSA_get_ex_data
  279.   {
  280.       return (CRYPTO_get_ex_data(&r->ex_data, idx));
  281. > }
  282.   
  283.   int RSA_memory_lock(RSA *r)

engines/e_4758cca.c:623:5: 
621.       long keyTokenLength;
622.       unsigned char *keyToken = (unsigned char *)RSA_get_ex_data(rsa, hndidx);
623. >     long length = SSL_SIG_LEN;
624.       long keyLength;
625.       unsigned char *hashBuffer = NULL;

engines/e_4758cca.c:625:5: 
623.       long length = SSL_SIG_LEN;
624.       long keyLength;
625. >     unsigned char *hashBuffer = NULL;
626.       X509_SIG sig;
627.       ASN1_TYPE parameter;

engines/e_4758cca.c:631:5: 
629.       ASN1_OCTET_STRING digest;
630.   
631. >     keyTokenLength = *(long *)keyToken;
632.       keyToken += sizeof(long);
633.   
