crypto/bn/bn_lib.c:454: error: BUFFER_OVERRUN_L3
  Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, 8388607].
Showing all 6 steps of the trace


crypto/bn/bn_lib.c:429:1: <Length trace>
427.   }
428.   
429. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
430.   {
431.       int i;

crypto/bn/bn_lib.c:429:1: Parameter `*a->d`
427.   }
428.   
429. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
430.   {
431.       int i;

crypto/bn/bn_lib.c:439:9: Call
437.       if (a == b)
438.           return (a);
439.       if (bn_wexpand(a, b->top) == NULL)
               ^
440.           return (NULL);
441.   

crypto/bn/bn_lib.c:995:1: Parameter `*a->d`
  993.   }
  994.   
  995. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
  996.   {
  997.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:443:5: Assignment
441.   
442.   #if 1
443.       A = a->d;
           ^
444.       B = b->d;
445.       for (i = b->top >> 2; i > 0; i--, A += 4, B += 4) {

crypto/bn/bn_lib.c:454:9: Array access: Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, 8388607]
452.           A[1] = a1;
453.           A[2] = a2;
454.           A[3] = a3;
               ^
455.       }
456.       /* ultrix cc workaround, see comments in bn_expand_internal */

BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
{
    int i;
    BN_ULONG *A;
    const BN_ULONG *B;
    bn_check_top(b);
    if (a == b)
        return (a);
    if (bn_wexpand(a, b->top) == NULL)
        return (NULL);
#if 1
    A = a->d;
    B = b->d;
    for (i = b->top >> 2; i > 0; i--, A += 4, B += 4) {
        BN_ULONG a0, a1, a2, a3;
        a0 = B[0];
        a1 = B[1];
        a2 = B[2];
        a3 = B[3];
        A[0] = a0;
        A[1] = a1;
        A[2] = a2;
        A[3] = a3;
    }
    switch (b->top & 3) {
    case 3:
        A[2] = B[2];
    case 2:
        A[1] = B[1];
    case 1:
        A[0] = B[0];
    case 0:;
    }
#else
    memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
#endif
    a->top = b->top;
    a->neg = b->neg;
    bn_check_top(a);
    return (a);
}
['BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)\n{\n    int i;\n    BN_ULONG *A;\n    const BN_ULONG *B;\n    bn_check_top(b);\n    if (a == b)\n        return (a);\n    if (bn_wexpand(a, b->top) == NULL)\n        return (NULL);\n#if 1\n    A = a->d;\n    B = b->d;\n    for (i = b->top >> 2; i > 0; i--, A += 4, B += 4) {\n        BN_ULONG a0, a1, a2, a3;\n        a0 = B[0];\n        a1 = B[1];\n        a2 = B[2];\n        a3 = B[3];\n        A[0] = a0;\n        A[1] = a1;\n        A[2] = a2;\n        A[3] = a3;\n    }\n    switch (b->top & 3) {\n    case 3:\n        A[2] = B[2];\n    case 2:\n        A[1] = B[1];\n    case 1:\n        A[0] = B[0];\n    case 0:;\n    }\n#else\n    memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);\n#endif\n    a->top = b->top;\n    a->neg = b->neg;\n    bn_check_top(a);\n    return (a);\n}', 'BIGNUM *bn_wexpand(BIGNUM *a, int words)\n{\n    return (words <= a->dmax) ? a : bn_expand2(a, words);\n}']