Package: xbase-clients
Version: 4.3.0
Severity: minor
Tags: patch

Well, I do not know for sure that this error ever happens,
but it looks like it could, and than will have some bad
implications.

Sometimes I get screwed up lines in xconsole that are not
in any of the /var/foolog files.  I hope this patch will
fix that.  It is just trial and error, but the code I found
looks so wrong that I decided to send in the patch anyway.

In inputReady() there is a test on the returned value from
read(), and a code block that is executed on error.  There is
a path through that block where the function may continue with
inappropriate values, in the worst case indexing outside an
array on the stack.


diff -rN -u xconsole-old/xconsole.c xconsole-new/xconsole.c
--- xconsole-old/xconsole.c     Thu Jul 22 17:04:15 2004
+++ xconsole-new/xconsole.c     Thu Jul 22 15:45:27 2004
@@ -469,8 +469,14 @@
        {
            OpenConsole();
        }
+       else
+       {
+           TextAppend (text, "I/O Error: All input stopped!\n", 30);
+       }
 
+       return;
     }
+
     Notify ();
     buffer[n] = '\0';
     if (app_resources.stripNonprint)


-- 
Tommy Pettersson <[EMAIL PROTECTED]>

Reply via email to