]> granicus.if.org Git - strace/commitdiff
* desc.c (decode_select): Set tcp->auxstr as late as possible.
authorDenys Vlasenko <dvlasenk@redhat.com>
Thu, 1 Sep 2011 09:27:37 +0000 (11:27 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Thu, 1 Sep 2011 09:27:37 +0000 (11:27 +0200)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
desc.c

diff --git a/desc.c b/desc.c
index 4d46339efabc84b679f7c3db16dd846e3b5700a3..9a858669be693adda16de92cadac6a40f624110a 100644 (file)
--- a/desc.c
+++ b/desc.c
@@ -549,7 +549,6 @@ decode_select(struct tcb *tcp, long *args, enum bitness_t bitness)
                if (!fds)
                        die_out_of_memory();
 
-               tcp->auxstr = outstr;
                outptr = outstr;
                sep = "";
                for (i = 0; i < 3; i++) {
@@ -594,6 +593,7 @@ decode_select(struct tcb *tcp, long *args, enum bitness_t bitness)
                }
 #endif /* LINUX */
                *outptr = '\0';
+               tcp->auxstr = outstr;
                return RVAL_STR;
 #undef end_outstr
        }