commit-inetutils
[Top][All Lists]
Advanced

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

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-47-g654247


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-47-g654247a
Date: Sat, 31 Jan 2015 15:40:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  654247a94d2934405f74c5576b1068e1a28314bd (commit)
      from  ddefbb13da21a8e173103e3c2451773d72ae77a6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=654247a94d2934405f74c5576b1068e1a28314bd


commit 654247a94d2934405f74c5576b1068e1a28314bd
Author: Mats Erik Andersson <address@hidden>
Date:   Sat Jan 31 16:33:31 2015 +0100

    telnet: Printing of uninitialized characters.
    
    Correctly test whether a string composed from a handful
    of contributions turned out to be empty after all.

diff --git a/ChangeLog b/ChangeLog
index b717ea3..b4a91a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-01-31  Mats Erik Andersson  <address@hidden>
+
+       telnet: Printing of uninitialized characters.
+       When preparing submodes of linemode for presentation, in case
+       no submode is set, the string to be printed might make use of
+       uninitialized string content, in an otherwise sane call to
+       fprintf().  This is in error already in the legacy code.
+
+       * telnet/utilities.c (printsub) <LM_MODE>: Test TBUF[0]
+       to calculate replacement string, since TBUF[1] is not
+       guaranteed to be initialized by the preceding sprintf().
+
 2015-01-30  Mats Erik Andersson  <address@hidden>
 
        * bootstrap: Updated from gnulib.
diff --git a/telnet/utilities.c b/telnet/utilities.c
index 67c534b..7bd5396 100644
--- a/telnet/utilities.c
+++ b/telnet/utilities.c
@@ -731,13 +731,14 @@ printsub (char direction, unsigned char *pointer, int 
length)
                }
              {
                char tbuf[64];
+
                sprintf (tbuf, "%s%s%s%s%s",
                         pointer[2] & MODE_EDIT ? "|EDIT" : "",
                         pointer[2] & MODE_TRAPSIG ? "|TRAPSIG" : "",
                         pointer[2] & MODE_SOFT_TAB ? "|SOFT_TAB" : "",
                         pointer[2] & MODE_LIT_ECHO ? "|LIT_ECHO" : "",
                         pointer[2] & MODE_ACK ? "|ACK" : "");
-               fprintf (NetTrace, "%s", tbuf[1] ? &tbuf[1] : "0");
+               fprintf (NetTrace, "%s", tbuf[0] ? &tbuf[1] : "0");
              }
              if (pointer[2] & ~(MODE_MASK))
                fprintf (NetTrace, " (0x%x)", pointer[2]);

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |   12 ++++++++++++
 telnet/utilities.c |    3 ++-
 2 files changed, 14 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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