Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/osf1 be more careful about getting the exec_name ...
details: https://anonhg.NetBSD.org/src/rev/188a536c9c2c
branches: trunk
changeset: 472353:188a536c9c2c
user: cgd <cgd%NetBSD.org@localhost>
date: Wed Apr 28 02:49:38 1999 +0000
description:
be more careful about getting the exec_name emul arg field
diffstat:
sys/compat/osf1/osf1_exec.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r e044cabb764a -r 188a536c9c2c sys/compat/osf1/osf1_exec.c
--- a/sys/compat/osf1/osf1_exec.c Wed Apr 28 02:34:47 1999 +0000
+++ b/sys/compat/osf1/osf1_exec.c Wed Apr 28 02:49:38 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_exec.c,v 1.4 1999/04/27 05:38:08 cgd Exp $ */
+/* $NetBSD: osf1_exec.c,v 1.5 1999/04/28 02:49:38 cgd Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -104,9 +104,16 @@
epp->ep_emul_arg = emul_arg;
emul_arg->flags = 0;
- /* includes /emul/osf1 if appropriate */
- strncpy(emul_arg->exec_name, epp->ep_ndp->ni_cnd.cn_pnbuf,
- MAXPATHLEN + 1);
+ if (epp->ep_ndp->ni_segflg == UIO_SYSSPACE)
+ error = copystr(epp->ep_ndp->ni_dirp, emul_arg->exec_name,
+ MAXPATHLEN + 1, NULL);
+ else
+ error = copyinstr(epp->ep_ndp->ni_dirp, emul_arg->exec_name,
+ MAXPATHLEN + 1, NULL);
+#ifdef DIAGNOSTIC
+ if (error != 0)
+ panic("osf1_exec_ecoff_hook: copyinstr failed");
+#endif
/* do any special object file handling */
switch (execp->f.f_flags & ECOFF_FLAG_OBJECT_TYPE_MASK) {
Home |
Main Index |
Thread Index |
Old Index