Module Name: src Committed By: mrg Date: Mon Jul 4 12:39:36 UTC 2011
Modified Files: src/sys/compat/linux/common: linux_termios.h Log Message: avoid array bounds violation on netbsd/mips when dealing with termio structures. (did linux/mips ever support termio?). the effect of this is that termio linux apps won't have VEOF support. i can't tell what it should be since that code isn't in linux going back quite some years. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 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.19 src/sys/compat/linux/common/linux_termios.h:1.20 --- src/sys/compat/linux/common/linux_termios.h:1.19 Sun Mar 15 15:55:51 2009 +++ src/sys/compat/linux/common/linux_termios.h Mon Jul 4 12:39:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_termios.h,v 1.19 2009/03/15 15:55:51 cegger Exp $ */ +/* $NetBSD: linux_termios.h,v 1.20 2011/07/04 12:39:36 mrg Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -263,7 +263,9 @@ bts->c_cc[VQUIT] = lt->c_cc[LINUX_OLD_VQUIT]; bts->c_cc[VERASE] = lt->c_cc[LINUX_OLD_VERASE]; bts->c_cc[VKILL] = lt->c_cc[LINUX_OLD_VKILL]; +#if LINUX_VEOF < LINUX_NCC bts->c_cc[VEOF] = lt->c_cc[LINUX_OLD_VEOF]; +#endif bts->c_cc[VTIME] = lt->c_cc[LINUX_OLD_VTIME]; bts->c_cc[VMIN] = lt->c_cc[LINUX_OLD_VMIN]; } @@ -347,7 +349,9 @@ lt->c_cc[LINUX_VQUIT] = bts->c_cc[VQUIT]; lt->c_cc[LINUX_VERASE] = bts->c_cc[VERASE]; lt->c_cc[LINUX_VKILL] = bts->c_cc[VKILL]; +#if LINUX_VEOF < LINUX_NCC lt->c_cc[LINUX_VEOF] = bts->c_cc[VEOF]; +#endif lt->c_cc[LINUX_VTIME] = bts->c_cc[VTIME]; lt->c_cc[LINUX_VMIN] = bts->c_cc[VMIN]; lt->c_cc[LINUX_VSWTC] = 0;