diff options
author | dim <dim@FreeBSD.org> | 2011-12-17 01:36:50 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-12-17 01:36:50 +0000 |
commit | 8c3e7b006248d436f4862b181ab9fd7a44c7b3a6 (patch) | |
tree | cd517513324f1fb9b12c338d2dc749d24b0390fc /usr.bin | |
parent | 7654ad989605547d72d8aa3ea016c9e6a1762bb8 (diff) | |
download | FreeBSD-src-8c3e7b006248d436f4862b181ab9fd7a44c7b3a6.zip FreeBSD-src-8c3e7b006248d436f4862b181ab9fd7a44c7b3a6.tar.gz |
In usr.bin/tar/tree.c, if you really want to poke to NULL, you must use
volatile, otherwise the indirection will not be emitted.
MFC after: 1 week
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tar/tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/tar/tree.c b/usr.bin/tar/tree.c index 58e9feb..27cbd71 100644 --- a/usr.bin/tar/tree.c +++ b/usr.bin/tar/tree.c @@ -315,7 +315,7 @@ tree_next(struct tree *t) const char *msg = "Unable to continue traversing" " directory hierarchy after a fatal error."; write(2, msg, strlen(msg)); - *(int *)0 = 1; /* Deliberate SEGV; NULL pointer dereference. */ + *(volatile int *)0 = 1; /* Deliberate SEGV; NULL pointer dereference. */ exit(1); /* In case the SEGV didn't work. */ } |