PATCH: Coverity CID 1692315 memcpy of uninitialized member winsize

Mikael Magnusson <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <[email protected]>
I think this is not actually a problem but might as well initialize it.
---
 Src/Zle/termquery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Src/Zle/termquery.c b/Src/Zle/termquery.c
index 7f0459a957..9a330a4b82 100644
--- a/Src/Zle/termquery.c
+++ b/Src/Zle/termquery.c
@@ -209,7 +209,7 @@ probe_terminal(const char *tquery, seqstate_t *states,
     int *num = numbers;
     int finish = 0, number = 0;
     int ch;
-    struct ttyinfo ti, torig;
+    struct ttyinfo ti = { 0 }, torig;
     struct value vbuf;
     Value v = getvalue(&vbuf, &WAITVAR, 0);
     long timeout = v ? -1 - getintvalue(v) : TIMEOUT;
-- 
2.38.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.