crypto/des/qud_cksm.c:122: error: BUFFER_OVERRUN_L1
  Offset: [1, +oo] Size: 1.
Showing all 5 steps of the trace


crypto/des/qud_cksm.c:77:1: <Length trace>
75.   #define NOISE   ((DES_LONG)83653421L)
76.   
77. > DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[],
78.                           long length, int out_count, DES_cblock *seed)
79.   {

crypto/des/qud_cksm.c:77:1: Parameter `(*output)[*]`
75.   #define NOISE   ((DES_LONG)83653421L)
76.   
77. > DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[],
78.                           long length, int out_count, DES_cblock *seed)
79.   {

crypto/des/qud_cksm.c:88:5: Assignment
86.       if (out_count < 1)
87.           out_count = 1;
88.       lp = (DES_LONG *)&(output[0])[0];
          ^
89.   
90.       z0 = Q_B0((*seed)[0]) | Q_B1((*seed)[1]) | Q_B2((*seed)[2]) |

crypto/des/qud_cksm.c:121:14: Assignment
119.                * 2*out_count 32 bit ints
120.                */
121.               *lp++ = z0;
                    ^
122.               *lp++ = z1;
123.           }

crypto/des/qud_cksm.c:122:13: Array access: Offset: [1, +oo] Size: 1
120.                */
121.               *lp++ = z0;
122.               *lp++ = z1;
                   ^
123.           }
124.       }

DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[],
                        long length, int out_count, DES_cblock *seed)
{
    DES_LONG z0, z1, t0, t1;
    int i;
    long l;
    const unsigned char *cp;
    DES_LONG *lp;
    if (out_count < 1)
        out_count = 1;
    lp = (DES_LONG *)&(output[0])[0];
    z0 = Q_B0((*seed)[0]) | Q_B1((*seed)[1]) | Q_B2((*seed)[2]) |
        Q_B3((*seed)[3]);
    z1 = Q_B0((*seed)[4]) | Q_B1((*seed)[5]) | Q_B2((*seed)[6]) |
        Q_B3((*seed)[7]);
    for (i = 0; ((i < 4) && (i < out_count)); i++) {
        cp = input;
        l = length;
        while (l > 0) {
            if (l > 1) {
                t0 = (DES_LONG)(*(cp++));
                t0 |= (DES_LONG)Q_B1(*(cp++));
                l--;
            } else
                t0 = (DES_LONG)(*(cp++));
            l--;
            t0 += z0;
            t0 &= 0xffffffffL;
            t1 = z1;
            z0 = ((((t0 * t0) & 0xffffffffL) + ((t1 * t1) & 0xffffffffL))
                  & 0xffffffffL) % 0x7fffffffL;
            z1 = ((t0 * ((t1 + NOISE) & 0xffffffffL)) & 0xffffffffL) %
                0x7fffffffL;
        }
        if (lp != NULL) {
            *lp++ = z0;
            *lp++ = z1;
        }
    }
    return (z0);
}
['DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[],\n                        long length, int out_count, DES_cblock *seed)\n{\n    DES_LONG z0, z1, t0, t1;\n    int i;\n    long l;\n    const unsigned char *cp;\n    DES_LONG *lp;\n    if (out_count < 1)\n        out_count = 1;\n    lp = (DES_LONG *)&(output[0])[0];\n    z0 = Q_B0((*seed)[0]) | Q_B1((*seed)[1]) | Q_B2((*seed)[2]) |\n        Q_B3((*seed)[3]);\n    z1 = Q_B0((*seed)[4]) | Q_B1((*seed)[5]) | Q_B2((*seed)[6]) |\n        Q_B3((*seed)[7]);\n    for (i = 0; ((i < 4) && (i < out_count)); i++) {\n        cp = input;\n        l = length;\n        while (l > 0) {\n            if (l > 1) {\n                t0 = (DES_LONG)(*(cp++));\n                t0 |= (DES_LONG)Q_B1(*(cp++));\n                l--;\n            } else\n                t0 = (DES_LONG)(*(cp++));\n            l--;\n            t0 += z0;\n            t0 &= 0xffffffffL;\n            t1 = z1;\n            z0 = ((((t0 * t0) & 0xffffffffL) + ((t1 * t1) & 0xffffffffL))\n                  & 0xffffffffL) % 0x7fffffffL;\n            z1 = ((t0 * ((t1 + NOISE) & 0xffffffffL)) & 0xffffffffL) %\n                0x7fffffffL;\n        }\n        if (lp != NULL) {\n            *lp++ = z0;\n            *lp++ = z1;\n        }\n    }\n    return (z0);\n}']