emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/xelb 76246b4 13/42: Check `length` slot in `xcb:icccm:-


From: Chris Feng
Subject: [elpa] externals/xelb 76246b4 13/42: Check `length` slot in `xcb:icccm:-GetProperty~reply`
Date: Thu, 17 Sep 2015 23:16:41 +0000

branch: externals/xelb
commit 76246b4b11a18339cc5d2b472f188ad83403ce59
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    Check `length` slot in `xcb:icccm:-GetProperty~reply`
    
    Some program (GIMP sometimes) seems only set `length` slot to 0 while 
leaving
    other slots (including `value-len`) uninitialized. This commit makes sure
    `length` slot is also checked.
---
 xcb-icccm.el |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xcb-icccm.el b/xcb-icccm.el
index 0fabbc8..1d178d8 100644
--- a/xcb-icccm.el
+++ b/xcb-icccm.el
@@ -123,8 +123,8 @@ according to BYTE-ARRAY.
 This method automatically format the value as 8, 16 or 32 bits array."
   (let ((retval (cl-call-next-method obj byte-array))
         tmp)
-    (with-slots (~lsb format bytes-after value-len value) obj
-      (if (= 0 value-len)
+    (with-slots (~lsb length format bytes-after value-len value) obj
+      (if (or (= 0 value-len) (= 0 length))
           (setf value nil)              ;no available value
         (setq tmp (substring value
                              0          ;long-offset



reply via email to

[Prev in Thread] Current Thread [Next in Thread]