[PATCH] Xext: relax assert in SecurityAuthorizationExpired.

Cyril Brulebois kibi at debian.org
Mon Mar 7 13:26:40 PST 2011


The following code path is considered valid:
  SecurityAuthorizationExpired
  TimerSet
  SecurityStartAuthorizationTimer

In other words, SecurityAuthorizationExpired can be called while
pAuth->timer is still NULL, so relax the assert() accordingly.

That might happen when one uses big timeouts in xauth calls, and would
make the server abort.

Debian Bug #616667 <http://bugs.debian.org/616667>
X.Org Bug #27134 <http://bugs.freedesktop.org/show_bug.cgi?id=27134>
X.Org Bug #35066 <http://bugs.freedesktop.org/show_bug.cgi?id=35066>

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 Xext/security.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Notes:
 * I guess a single X.Org Bug reference would be sufficient, but
   #27134 is still private right now, so I'm mentioning both bugs.
 * Probably a candidate for stable branches.


diff --git a/Xext/security.c b/Xext/security.c
index 8673880..003da79 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -312,7 +312,7 @@ SecurityAuthorizationExpired(
 {
     SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)pval;
 
-    assert(pAuth->timer == timer);
+    assert((pAuth->timer == NULL) || (pAuth->timer == timer));
 
     if (pAuth->secondsRemaining)
     {
-- 
1.7.4.1



More information about the xorg-devel mailing list