[vte/wip/l2-21235: 1/7] sixel: context: Add extra safety check




commit c6b2a3664047e6a4d56696592bef1bb52d99b87e
Author: Christian Persch <chpe src gnome org>
Date:   Thu Apr 7 16:44:09 2022 +0200

    sixel: context: Add extra safety check
    
    TODO: check if this is really necessary!

 src/sixel-context.hh | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/sixel-context.hh b/src/sixel-context.hh
index 264f3046..93d1b0d6 100644
--- a/src/sixel-context.hh
+++ b/src/sixel-context.hh
@@ -557,6 +557,11 @@ private:
                  * References: DEC PPLV2 ยง 5.5.1
                  */
 
+                if (!m_scanline_pos) [[unlikely]] {
+                        m_repeat_count = 1;
+                        return;
+                }
+
                 if (sixel) {
                         auto const color = m_current_color;
                         auto const scanline_end = m_scanline_end;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]