[PATCH v3] edid-decode: Avoid division by zero

2019-10-01 Thread Breno Leitao
: ... Invalid Detailed Timings: Horizontal Active/Blanking 32/0 Vertical Active/Blanking 0/0 ... Signed-off-by: Breno Leitao --- edid-decode.c | 8 1 file changed, 8 insertions(+) diff --git a/edid-decode.c b/edid-decode.c index 7442f8a..2612e70 100644 --- a/edid-decode.c +++ b/edid

Re: [PATCH v2] edid-decode: Avoid division by zero

2019-10-01 Thread Breno Leitao
On 01/10/2019 10:26, Hans Verkuil wrote: > Can you just mail me the raw output? > > cat /sys/devices/pci:00/:00:02.0/drm/card0/card0-HDMI-A-1/edid > >edid.bin Sure, here it is. edid.bin Description: application/macbinary

Re: [PATCH v2] edid-decode: Avoid division by zero

2019-10-01 Thread Breno Leitao
On 01/10/2019 10:16, Hans Verkuil wrote: > On 10/1/19 11:15 AM, Breno Leitao wrote: >> Hi Hans, >> >> On 01/10/2019 09:39, Hans Verkuil wrote: >>> On 10/1/19 10:10 AM, Breno Leitao wrote: >>>> There are some weird monitors that returns invalid data,

Re: [PATCH v2] edid-decode: Avoid division by zero

2019-10-01 Thread Breno Leitao
Hi Hans, On 01/10/2019 09:39, Hans Verkuil wrote: > On 10/1/19 10:10 AM, Breno Leitao wrote: >> There are some weird monitors that returns invalid data, as zeroed >> Horizontal/Vertical Active/Blanking. > > Do you have an EDID that does this? I'd like to add it to th

[PATCH v2] edid-decode: Avoid division by zero

2019-10-01 Thread Breno Leitao
There are some weird monitors that returns invalid data, as zeroed Horizontal/Vertical Active/Blanking. This causes edid-decode to crash with a division by zero exception. This simple patch avoids so, checking for the divisor before proceeding. Signed-off-by: Breno Leitao --- edid-decode.c

[PATCH] edid-decode: Avoid division by zero

2019-09-30 Thread Breno Leitao
There are some weird monitors that returns invalid data, as zeroed Horizontal/Vertical Active/Blanking. This causes edid-decode to crash with a divsion by error exception. This simple patch avoids so, checking for the divisor before proceeding. Signed-off-by: Breno Leitao --- edid-decode.c