[FFmpeg-devel] [PATCH][GSoC] lavf/http: Parse and set HTTP method when listening on HTTP(S)

Stephan Holljes klaxa1337 at googlemail.com
Fri May 29 16:12:27 CEST 2015


Hi,

On Fri, May 29, 2015 at 11:54 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Fri, May 29, 2015 at 05:05:08AM +0200, Stephan Holljes wrote:
>> Signed-off-by: Stephan Holljes <klaxa1337 at googlemail.com>
>> ---
>>  libavformat/http.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/libavformat/http.c b/libavformat/http.c
>> index 4f6716a..3fad43d 100644
>> --- a/libavformat/http.c
>> +++ b/libavformat/http.c
>> @@ -556,6 +556,14 @@ static int process_line(URLContext *h, char *line, int line_count,
>>
>>      p = line;
>>      if (line_count == 0) {
>> +        if (s->listen) {
>> +            while (!av_isspace(*p))
>> +                p++;
>
>> +            s->method = av_malloc(p - line);
>> +            if (!s->method)
>> +                return AVERROR(ENOMEM);
>> +            av_strlcpy(s->method, line, p - line + 1);
>
> the allocated size and the size passed to av_strlcpy() should match

Attached patch fixes that.

>
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> No human being will ever know the Truth, for even if they happen to say it
> by chance, they would not even known they had done so. -- Xenophanes
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-http-Parse-and-set-HTTP-method-when-listening-o.patch
Type: text/x-patch
Size: 1014 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150529/c0e39728/attachment.bin>


More information about the ffmpeg-devel mailing list