libavformat/rtspdec.c:477: error: Integer Overflow R2
  ([0, +oo] + [0, +oo]):signed32 by call to `rtsp_send_reply`.

libavformat/rtspdec.c:458:35: Unknown value from: __infer_zero_initialization
456.     int ret;
457.     int rbuflen               = 0;
458.     RTSPMessageHeader request = { 0 };
                                       ^
459.     enum RTSPMethod methodcode;
460. 

libavformat/rtspdec.c:471:11: Call
469.     }
470. 
471.     ret = rtsp_read_request(s, &request, method);
               ^
472.     if (ret)
473.         return ret;

libavformat/rtspdec.c:138:1: Parameter `request->transports[*].source.*.strlen`
  136. }
  137. 
  138. static inline int rtsp_read_request(AVFormatContext *s,
       ^
  139.                                     RTSPMessageHeader *request,
  140.                                     const char *method)

libavformat/rtspdec.c:477:21: Call
475.     if (methodcode == PAUSE) {
476.         rt->state = RTSP_STATE_PAUSED;
477.         ret       = rtsp_send_reply(s, RTSP_STATUS_OK, NULL , request.seq);
                         ^
478.         // TODO: Missing date header in response
479.     } else if (methodcode == OPTIONS) {

libavformat/rtspdec.c:93:1: Parameter `message.strlen`
  91. }
  92. 
  93. static int rtsp_send_reply(AVFormatContext *s, enum RTSPStatusCode code,
      ^
  94.                            const char *extracontent, uint16_t seq)
  95. {

libavformat/rtspdec.c:109:5: Call
  107.     if (!status_messages[index].code)
  108.         return AVERROR(EINVAL);
  109.     av_strlcatf(message, sizeof(message), "CSeq: %d\r\n", seq);
           ^
  110.     av_strlcatf(message, sizeof(message), "Server: %s\r\n", LIBAVFORMAT_IDENT);
  111.     if (extracontent)

libavutil/avstring.c:82:1: <LHS trace>
80. }
81. 
82. size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...)
    ^
83. {
84.     int len = strlen(dst);

libavutil/avstring.c:82:1: Parameter `size`
    80. }
    81. 
    82. size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...)
        ^
    83. {
    84.     int len = strlen(dst);

libavutil/avstring.c:88:12: <RHS trace>
86. 
87.     va_start(vl, fmt);
88.     len += vsnprintf(dst + len, size > len ? size - len : 0, fmt, vl);
               ^
89.     va_end(vl);
90. 

libavutil/avstring.c:88:12: Risky value from: vsnprintf
    86. 
    87.     va_start(vl, fmt);
    88.     len += vsnprintf(dst + len, size > len ? size - len : 0, fmt, vl);
                   ^
    89.     va_end(vl);
    90. 

libavutil/avstring.c:88:5: Binary operation: ([0, +oo] + [0, +oo]):signed32 by call to `rtsp_send_reply` 
    86. 
    87.     va_start(vl, fmt);
    88.     len += vsnprintf(dst + len, size > len ? size - len : 0, fmt, vl);
            ^
    89.     va_end(vl);
    90. 

size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...)
{
    int len = strlen(dst);
    va_list vl;
    va_start(vl, fmt);
    len += vsnprintf(dst + len, size > len ? size - len : 0, fmt, vl);
    va_end(vl);
    return len;
}
['int ff_rtsp_parse_streaming_commands(AVFormatContext *s)\n{\n    RTSPState *rt = s->priv_data;\n    unsigned char rbuf[4096];\n    unsigned char method[10];\n    char uri[500];\n    int ret;\n    int rbuflen               = 0;\n    RTSPMessageHeader request = { 0 };\n    enum RTSPMethod methodcode;\n    ret = read_line(s, rbuf, sizeof(rbuf), &rbuflen);\n    if (ret < 0)\n        return ret;\n    ret = parse_command_line(s, rbuf, rbuflen, uri, sizeof(uri), method,\n                             sizeof(method), &methodcode);\n    if (ret) {\n        av_log(s, AV_LOG_ERROR, "RTSP: Unexpected Command\\n");\n        return ret;\n    }\n    ret = rtsp_read_request(s, &request, method);\n    if (ret)\n        return ret;\n    rt->seq++;\n    if (methodcode == PAUSE) {\n        rt->state = RTSP_STATE_PAUSED;\n        ret       = rtsp_send_reply(s, RTSP_STATUS_OK, NULL , request.seq);\n    } else if (methodcode == OPTIONS) {\n        ret = rtsp_send_reply(s, RTSP_STATUS_OK,\n                              "Public: ANNOUNCE, PAUSE, SETUP, TEARDOWN, "\n                              "RECORD\\r\\n", request.seq);\n    } else if (methodcode == TEARDOWN) {\n        rt->state = RTSP_STATE_IDLE;\n        ret       = rtsp_send_reply(s, RTSP_STATUS_OK, NULL , request.seq);\n        return 0;\n    }\n    return ret;\n}', 'static inline int rtsp_read_request(AVFormatContext *s,\n                                    RTSPMessageHeader *request,\n                                    const char *method)\n{\n    RTSPState *rt = s->priv_data;\n    char rbuf[1024];\n    int rbuflen, ret;\n    do {\n        ret = read_line(s, rbuf, sizeof(rbuf), &rbuflen);\n        if (ret)\n            return ret;\n        if (rbuflen > 1) {\n            av_dlog(s, "Parsing[%d]: %s\\n", rbuflen, rbuf);\n            ff_rtsp_parse_line(request, rbuf, rt, method);\n        }\n    } while (rbuflen > 0);\n    if (request->seq != rt->seq + 1) {\n        av_log(s, AV_LOG_ERROR, "Unexpected Sequence number %d\\n",\n               request->seq);\n        return AVERROR(EINVAL);\n    }\n    if (rt->session_id[0] && strcmp(method, "OPTIONS")) {\n        ret = check_sessionid(s, request);\n        if (ret)\n            return ret;\n    }\n    return 0;\n}', 'static int rtsp_send_reply(AVFormatContext *s, enum RTSPStatusCode code,\n                           const char *extracontent, uint16_t seq)\n{\n    RTSPState *rt = s->priv_data;\n    char message[4096];\n    int index = 0;\n    while (status_messages[index].code) {\n        if (status_messages[index].code == code) {\n            snprintf(message, sizeof(message), "RTSP/1.0 %d %s\\r\\n",\n                     code, status_messages[index].message);\n            break;\n        }\n        index++;\n    }\n    if (!status_messages[index].code)\n        return AVERROR(EINVAL);\n    av_strlcatf(message, sizeof(message), "CSeq: %d\\r\\n", seq);\n    av_strlcatf(message, sizeof(message), "Server: %s\\r\\n", LIBAVFORMAT_IDENT);\n    if (extracontent)\n        av_strlcat(message, extracontent, sizeof(message));\n    av_strlcat(message, "\\r\\n", sizeof(message));\n    av_dlog(s, "Sending response:\\n%s", message);\n    ffurl_write(rt->rtsp_hd, message, strlen(message));\n    return 0;\n}', 'size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...)\n{\n    int len = strlen(dst);\n    va_list vl;\n    va_start(vl, fmt);\n    len += vsnprintf(dst + len, size > len ? size - len : 0, fmt, vl);\n    va_end(vl);\n    return len;\n}']