summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2006-05-15 21:03:02 +0000
committerpav <pav@FreeBSD.org>2006-05-15 21:03:02 +0000
commitcb83f3a7fe4902a29ace2805de6470154aa3d7c2 (patch)
treef077f2840ae12a716dfa3ba4f3f9130173732ce0
parent815d2ff3a4c9f907125913dd04b815e9b62c96a2 (diff)
downloadFreeBSD-src-cb83f3a7fe4902a29ace2805de6470154aa3d7c2.zip
FreeBSD-src-cb83f3a7fe4902a29ace2805de6470154aa3d7c2.tar.gz
- Fix crash when hitting unknown syscall. Copied from i386-fbsd.c
Approved by: alfred
-rw-r--r--usr.bin/truss/amd64-fbsd.c3
-rw-r--r--usr.bin/truss/amd64-linux32.c3
-rw-r--r--usr.bin/truss/i386-linux.c3
-rw-r--r--usr.bin/truss/ia64-fbsd.c3
-rw-r--r--usr.bin/truss/sparc64-fbsd.c3
5 files changed, 10 insertions, 5 deletions
diff --git a/usr.bin/truss/amd64-fbsd.c b/usr.bin/truss/amd64-fbsd.c
index 701813b..49d7880 100644
--- a/usr.bin/truss/amd64-fbsd.c
+++ b/usr.bin/truss/amd64-fbsd.c
@@ -242,7 +242,8 @@ amd64_syscall_entry(struct trussinfo *trussinfo, int nargs) {
* parameter?
*/
- if (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit")) {
+ if (fsc.name != NULL &&
+ (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) {
/* XXX
* This could be done in a more general
diff --git a/usr.bin/truss/amd64-linux32.c b/usr.bin/truss/amd64-linux32.c
index 9833829..42b49ec 100644
--- a/usr.bin/truss/amd64-linux32.c
+++ b/usr.bin/truss/amd64-linux32.c
@@ -219,7 +219,8 @@ i386_linux_syscall_entry(struct trussinfo *trussinfo, int nargs) {
* parameter?
*/
- if (!strcmp(fsc.name, "linux_execve") || !strcmp(fsc.name, "exit")) {
+ if (fsc.name != NULL &&
+ (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) {
/* XXX
* This could be done in a more general
diff --git a/usr.bin/truss/i386-linux.c b/usr.bin/truss/i386-linux.c
index 9833829..42b49ec 100644
--- a/usr.bin/truss/i386-linux.c
+++ b/usr.bin/truss/i386-linux.c
@@ -219,7 +219,8 @@ i386_linux_syscall_entry(struct trussinfo *trussinfo, int nargs) {
* parameter?
*/
- if (!strcmp(fsc.name, "linux_execve") || !strcmp(fsc.name, "exit")) {
+ if (fsc.name != NULL &&
+ (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) {
/* XXX
* This could be done in a more general
diff --git a/usr.bin/truss/ia64-fbsd.c b/usr.bin/truss/ia64-fbsd.c
index 10fcd62..e233505 100644
--- a/usr.bin/truss/ia64-fbsd.c
+++ b/usr.bin/truss/ia64-fbsd.c
@@ -223,7 +223,8 @@ ia64_syscall_entry(struct trussinfo *trussinfo, int nargs) {
* parameter?
*/
- if (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit")) {
+ if (fsc.name != NULL &&
+ (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) {
/* XXX
* This could be done in a more general
diff --git a/usr.bin/truss/sparc64-fbsd.c b/usr.bin/truss/sparc64-fbsd.c
index d30dc23..ff5073d 100644
--- a/usr.bin/truss/sparc64-fbsd.c
+++ b/usr.bin/truss/sparc64-fbsd.c
@@ -259,7 +259,8 @@ sparc64_syscall_entry(struct trussinfo *trussinfo, int nargs) {
* parameter?
*/
- if (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit")) {
+ if (fsc.name != NULL &&
+ (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) {
/* XXX
* This could be done in a more general
OpenPOWER on IntegriCloud