On Tue, Nov 25, 2014 at 10:42 PM, Luca Barbato <[email protected]> wrote:
> On 24/11/14 16:49, Luca Barbato wrote:
>>
>> On 24/11/14 16:45, Vittorio Giovara wrote:
>>>
>>> From: Michael Niedermayer <[email protected]>
>>>
>>> Fixes CID1254664
>>>
>>> Signed-off-by: Michael Niedermayer <[email protected]>
>>> ---
>>>   libavdevice/xcbgrab.c | 14 ++++++--------
>>>   1 file changed, 6 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
>>> index 2fdb992..1657b7d 100644
>>> --- a/libavdevice/xcbgrab.c
>>> +++ b/libavdevice/xcbgrab.c
>>> @@ -596,21 +596,19 @@ static av_cold int
>>> xcbgrab_read_header(AVFormatContext *s)
>>>       const xcb_setup_t *setup;
>>>       char *display_name = av_strdup(s->filename);
>>>
>>> -    if (s->filename) {
>>> -        if (!display_name)
>>> -            return AVERROR(ENOMEM);
>>
>>
>> Wrong before and wrong after...
>
>
> To make it clear. The problem is not present in Libav to begin with.

For completeness, here is coverity's report

597    c->conn = xcb_connect(s->filename, &screen_num);
598    if ((ret = xcb_connection_has_error(c->conn))) {

CID 1254664 (#1 of 1): Array compared against 0 (NO_EFFECT)array_null:
Comparing an array to null is not useful: s->filename.
599        av_log(s, AV_LOG_ERROR, "Cannot open display %s, error %d.\n",
600               s->filename ? s->filename : "default", ret);
601        return AVERROR(EIO);
602    }

-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to