This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: edid-decode: fix divide by zero in type17 timings parsing
Author:  Maciej Miszczyk <mmiszc...@logitech.com>
Date:    Fri Dec 13 18:06:29 2024 +0100

Fix divide by zero in type17 timings parsing.

Signed-off-by: Maciej Miszczyk <mmiszc...@logitech.com>
Signed-off-by: Hans Verkuil <hverk...@xs4all.nl>

 utils/edid-decode/parse-displayid-block.cpp | 4 ++++
 1 file changed, 4 insertions(+)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=a679f1672a6e9b73764b310d2c6ab4453b5cf186
diff --git a/utils/edid-decode/parse-displayid-block.cpp 
b/utils/edid-decode/parse-displayid-block.cpp
index a67ddac3b1c6..5c159d20ccc0 100644
--- a/utils/edid-decode/parse-displayid-block.cpp
+++ b/utils/edid-decode/parse-displayid-block.cpp
@@ -369,6 +369,10 @@ void edid_state::parse_displayid_type_1_7_timing(const 
unsigned char *x,
                }
                unsigned htot = t.hact + t.hfp + t.hsync + t.hbp;
                unsigned vtot = t.vact + t.vfp + t.vsync + t.vbp;
+               if (htot * vtot == 0) {
+                       fail("Cannot calculate refresh rate: htot * vtot is 
0.\n");
+                       return;
+               }
                unsigned refresh = (t.pixclk_khz * 1000ULL) / (htot * vtot);
 
                for (unsigned rb = RB_NONE; rb <= RB_CVT_V3; rb++) {

Reply via email to