libavformat/httpauth.c:204: error: Buffer Overrun L2
  Offset: [1, 15] Size: 9 by call to `ff_data_to_hex`.

libavformat/httpauth.c:183:1: Array declaration
181. 
182. /* Generate a digest reply, according to RFC 2617. */
183. static char *make_digest_auth(HTTPAuthState *state, const char *username,
     ^
184.                               const char *password, const char *uri,
185.                               const char *method)

libavformat/httpauth.c:204:5: Call
202.     for (i = 0; i < 2; i++)
203.         cnonce_buf[i] = ff_random_get_seed();
204.     ff_data_to_hex(cnonce, (const uint8_t*) cnonce_buf, sizeof(cnonce_buf), 1);
         ^
205.     cnonce[2*sizeof(cnonce_buf)] = 0;
206. 

libavformat/utils.c:3467:1: <Offset trace>
3465. }
3466. 
3467. char *ff_data_to_hex(char *buff, const uint8_t *src, int s, int lowercase)
      ^
3468. {
3469.     int i;

libavformat/utils.c:3467:1: Parameter `s`
  3465. }
  3466. 
  3467. char *ff_data_to_hex(char *buff, const uint8_t *src, int s, int lowercase)
        ^
  3468. {
  3469.     int i;

libavformat/utils.c:3467:1: <Length trace>
3465. }
3466. 
3467. char *ff_data_to_hex(char *buff, const uint8_t *src, int s, int lowercase)
      ^
3468. {
3469.     int i;

libavformat/utils.c:3467:1: Parameter `*buff`
  3465. }
  3466. 
  3467. char *ff_data_to_hex(char *buff, const uint8_t *src, int s, int lowercase)
        ^
  3468. {
  3469.     int i;

libavformat/utils.c:3482:9: Array access: Offset: [1, 15] Size: 9 by call to `ff_data_to_hex` 
  3480.     for(i = 0; i < s; i++) {
  3481.         buff[i * 2]     = hex_table[src[i] >> 4];
  3482.         buff[i * 2 + 1] = hex_table[src[i] & 0xF];
                ^
  3483.     }
  3484. 

char *ff_data_to_hex(char *buff, const uint8_t *src, int s, int lowercase)
{
    int i;
    static const char hex_table_uc[16] = { '0', '1', '2', '3',
                                           '4', '5', '6', '7',
                                           '8', '9', 'A', 'B',
                                           'C', 'D', 'E', 'F' };
    static const char hex_table_lc[16] = { '0', '1', '2', '3',
                                           '4', '5', '6', '7',
                                           '8', '9', 'a', 'b',
                                           'c', 'd', 'e', 'f' };
    const char *hex_table = lowercase ? hex_table_lc : hex_table_uc;
    for(i = 0; i < s; i++) {
        buff[i * 2]     = hex_table[src[i] >> 4];
        buff[i * 2 + 1] = hex_table[src[i] & 0xF];
    }
    return buff;
}
['static char *make_digest_auth(HTTPAuthState *state, const char *username,\n                              const char *password, const char *uri,\n                              const char *method)\n{\n    DigestParams *digest = &state->digest_params;\n    int len;\n    uint32_t cnonce_buf[2];\n    char cnonce[9];\n    char nc[9];\n    int i;\n    char A1hash[33], A2hash[33], response[33];\n    struct AVMD5 *md5ctx;\n    uint8_t hash[16];\n    char *authstr;\n    digest->nc++;\n    snprintf(nc, sizeof(nc), "%08x", digest->nc);\n    for (i = 0; i < 2; i++)\n        cnonce_buf[i] = ff_random_get_seed();\n    ff_data_to_hex(cnonce, (const uint8_t*) cnonce_buf, sizeof(cnonce_buf), 1);\n    cnonce[2*sizeof(cnonce_buf)] = 0;\n    md5ctx = av_malloc(av_md5_size);\n    if (!md5ctx)\n        return NULL;\n    av_md5_init(md5ctx);\n    update_md5_strings(md5ctx, username, ":", state->realm, ":", password, NULL);\n    av_md5_final(md5ctx, hash);\n    ff_data_to_hex(A1hash, hash, 16, 1);\n    A1hash[32] = 0;\n    if (!strcmp(digest->algorithm, "") || !strcmp(digest->algorithm, "MD5")) {\n    } else if (!strcmp(digest->algorithm, "MD5-sess")) {\n        av_md5_init(md5ctx);\n        update_md5_strings(md5ctx, A1hash, ":", digest->nonce, ":", cnonce, NULL);\n        av_md5_final(md5ctx, hash);\n        ff_data_to_hex(A1hash, hash, 16, 1);\n        A1hash[32] = 0;\n    } else {\n        av_free(md5ctx);\n        return NULL;\n    }\n    av_md5_init(md5ctx);\n    update_md5_strings(md5ctx, method, ":", uri, NULL);\n    av_md5_final(md5ctx, hash);\n    ff_data_to_hex(A2hash, hash, 16, 1);\n    A2hash[32] = 0;\n    av_md5_init(md5ctx);\n    update_md5_strings(md5ctx, A1hash, ":", digest->nonce, NULL);\n    if (!strcmp(digest->qop, "auth") || !strcmp(digest->qop, "auth-int")) {\n        update_md5_strings(md5ctx, ":", nc, ":", cnonce, ":", digest->qop, NULL);\n    }\n    update_md5_strings(md5ctx, ":", A2hash, NULL);\n    av_md5_final(md5ctx, hash);\n    ff_data_to_hex(response, hash, 16, 1);\n    response[32] = 0;\n    av_free(md5ctx);\n    if (!strcmp(digest->qop, "") || !strcmp(digest->qop, "auth")) {\n    } else if (!strcmp(digest->qop, "auth-int")) {\n        return NULL;\n    } else {\n        return NULL;\n    }\n    len = strlen(username) + strlen(state->realm) + strlen(digest->nonce) +\n              strlen(uri) + strlen(response) + strlen(digest->algorithm) +\n              strlen(digest->opaque) + strlen(digest->qop) + strlen(cnonce) +\n              strlen(nc) + 150;\n    authstr = av_malloc(len);\n    if (!authstr)\n        return NULL;\n    snprintf(authstr, len, "Authorization: Digest ");\n    av_strlcatf(authstr, len, "username=\\"%s\\"",   username);\n    av_strlcatf(authstr, len, ",realm=\\"%s\\"",     state->realm);\n    av_strlcatf(authstr, len, ",nonce=\\"%s\\"",     digest->nonce);\n    av_strlcatf(authstr, len, ",uri=\\"%s\\"",       uri);\n    av_strlcatf(authstr, len, ",response=\\"%s\\"",  response);\n    if (digest->algorithm[0])\n        av_strlcatf(authstr, len, ",algorithm=%s",  digest->algorithm);\n    if (digest->opaque[0])\n        av_strlcatf(authstr, len, ",opaque=\\"%s\\"", digest->opaque);\n    if (digest->qop[0]) {\n        av_strlcatf(authstr, len, ",qop=\\"%s\\"",    digest->qop);\n        av_strlcatf(authstr, len, ",cnonce=\\"%s\\"", cnonce);\n        av_strlcatf(authstr, len, ",nc=%s",         nc);\n    }\n    av_strlcatf(authstr, len, "\\r\\n");\n    return authstr;\n}', "char *ff_data_to_hex(char *buff, const uint8_t *src, int s, int lowercase)\n{\n    int i;\n    static const char hex_table_uc[16] = { '0', '1', '2', '3',\n                                           '4', '5', '6', '7',\n                                           '8', '9', 'A', 'B',\n                                           'C', 'D', 'E', 'F' };\n    static const char hex_table_lc[16] = { '0', '1', '2', '3',\n                                           '4', '5', '6', '7',\n                                           '8', '9', 'a', 'b',\n                                           'c', 'd', 'e', 'f' };\n    const char *hex_table = lowercase ? hex_table_lc : hex_table_uc;\n    for(i = 0; i < s; i++) {\n        buff[i * 2]     = hex_table[src[i] >> 4];\n        buff[i * 2 + 1] = hex_table[src[i] & 0xF];\n    }\n    return buff;\n}"]