From: Zubin Mithra <zubin.mit...@gmail.com>

* desc.c (decode_select): Initialize fds to NULL.
* strace.c (expand_tcbtab): Change type to unsigned.
(startup_child): Initialize pathname array.

Signed-off-by: Zubin Mithra <zubin.mit...@gmail.com>
---
 desc.c   | 2 +-
 strace.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/desc.c b/desc.c
index 5b8869b..de513a6 100644
--- a/desc.c
+++ b/desc.c
@@ -314,7 +314,7 @@ decode_select(struct tcb *tcp, long *args, enum bitness_t 
bitness)
 {
        int i, j;
        int nfds, fdsize;
-       fd_set *fds;
+       fd_set *fds = NULL;
        const char *sep;
        long arg;
 
diff --git a/strace.c b/strace.c
index 4154cde..c9056c5 100644
--- a/strace.c
+++ b/strace.c
@@ -675,7 +675,7 @@ expand_tcbtab(void)
           callers have pointers and it would be a pain.
           So tcbtab is a table of pointers.  Since we never
           free the TCBs, we allocate a single chunk of many.  */
-       int i = tcbtabsize;
+       unsigned int i = tcbtabsize;
        struct tcb *newtcbs = calloc(tcbtabsize, sizeof(newtcbs[0]));
        struct tcb **newtab = realloc(tcbtab, tcbtabsize * 2 * 
sizeof(tcbtab[0]));
        if (!newtab || !newtcbs)
@@ -1160,7 +1160,7 @@ startup_child(char **argv)
 {
        struct_stat statbuf;
        const char *filename;
-       char pathname[MAXPATHLEN];
+       char pathname[MAXPATHLEN] = "";
        int pid;
        struct tcb *tcp;
 
-- 
1.8.4


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to