commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 06/64: utils/rpctrace: fix crash while printing messages


From: Samuel Thibault
Subject: [hurd] 06/64: utils/rpctrace: fix crash while printing messages
Date: Wed, 10 Dec 2014 15:17:03 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 6cc0c78b1f496cc9e680c0726b7561c93c3f1a7c
Author: Justus Winter <address@hidden>
Date:   Wed Nov 12 13:20:52 2014 +0100

    utils/rpctrace: fix crash while printing messages
    
    % fakeroot rpctrace install
    [...]
      63<--66(pid5363)->io_read (-1 8192) = 0 [... rpctrace crashes]
    /bin/fakeauth: Segmentation fault for child 5362
    /bin/settrans: Error 139 for child 5361
    
    * utils/rpctrace.c (print_data): Fix this by guarding the code
    escaping non-printable characters introduced in 84932431 against
    `data' being NULL.
---
 utils/rpctrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/rpctrace.c b/utils/rpctrace.c
index b11fea4..c954e51 100644
--- a/utils/rpctrace.c
+++ b/utils/rpctrace.c
@@ -1606,7 +1606,7 @@ print_data (mach_msg_type_name_t type,
         the first character that has not yet been printed.  */
       const char *p, *q;
       p = q = (const char *) data;
-      while (*q && q - (const char *) data < (int) (nelt * eltsize))
+      while (q && *q && q - (const char *) data < (int) (nelt * eltsize))
        {
          if (isgraph (*q) || *q == ' ')
            {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

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