Module Name:    src
Committed By:   maxv
Date:           Fri Aug 23 06:59:52 UTC 2019

Modified Files:
        src/sys/compat/linux/common: linux_termios.h

Log Message:
Fix info leaks.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/compat/linux/common/linux_termios.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/common/linux_termios.h
diff -u src/sys/compat/linux/common/linux_termios.h:1.21 src/sys/compat/linux/common/linux_termios.h:1.22
--- src/sys/compat/linux/common/linux_termios.h:1.21	Sun Sep 25 13:40:07 2011
+++ src/sys/compat/linux/common/linux_termios.h	Fri Aug 23 06:59:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_termios.h,v 1.21 2011/09/25 13:40:07 chs Exp $	*/
+/*	$NetBSD: linux_termios.h,v 1.22 2019/08/23 06:59:52 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -279,6 +279,7 @@ bsd_termios_to_linux_termio(struct termi
 {
 	int i, mask;
 
+	memset(lt, 0, sizeof(*lt));
 	lt->c_iflag = 0;
 	lt->c_iflag |= cvtto_linux_mask(bts->c_iflag, IGNBRK, LINUX_IGNBRK);
 	lt->c_iflag |= cvtto_linux_mask(bts->c_iflag, BRKINT, LINUX_BRKINT);
@@ -466,6 +467,7 @@ bsd_termios_to_linux_termios(struct term
 {
 	int i, mask;
 
+	memset(lts, 0, sizeof(*lts));
 	lts->c_iflag = 0;
 	lts->c_iflag |= cvtto_linux_mask(bts->c_iflag, IGNBRK, LINUX_IGNBRK);
 	lts->c_iflag |= cvtto_linux_mask(bts->c_iflag, BRKINT, LINUX_BRKINT);

Reply via email to