diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-01-14 17:36:23 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-01-14 17:36:23 +0000 |
commit | 5c93728d0b555090fbe8ca6f9ac13bb2cdbb48e0 (patch) | |
tree | f2e9cc4bd7f3c60c72fd8698a9064c10339dcb3c /dev-util/strace/files | |
parent | Version bump. (diff) | |
download | gentoo-2-5c93728d0b555090fbe8ca6f9ac13bb2cdbb48e0.tar.gz gentoo-2-5c93728d0b555090fbe8ca6f9ac13bb2cdbb48e0.tar.bz2 gentoo-2-5c93728d0b555090fbe8ca6f9ac13bb2cdbb48e0.zip |
Break out of infinite loop from corrupt getdents structs.
(Portage version: 2.1.4)
Diffstat (limited to 'dev-util/strace/files')
-rw-r--r-- | dev-util/strace/files/strace-4.5.16-getdents-infinite-loop.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-util/strace/files/strace-4.5.16-getdents-infinite-loop.patch b/dev-util/strace/files/strace-4.5.16-getdents-infinite-loop.patch new file mode 100644 index 000000000000..20bdcdfcff23 --- /dev/null +++ b/dev-util/strace/files/strace-4.5.16-getdents-infinite-loop.patch @@ -0,0 +1,26 @@ +if the getdents struct is corrupt, strace will loop forever + +--- strace/file.c ++++ strace/file.c +@@ -2414,6 +2414,10 @@ struct tcb *tcp; + #endif /* SUNOS4 */ + i += d->d_reclen; + dents++; ++ if (!d->d_reclen) { ++ fprintf(stderr, "[error: d->d_reclen == 0] "); ++ break; ++ } + } + if (!abbrev(tcp)) + tprintf("}"); +@@ -2466,6 +2470,10 @@ struct tcb * tcp; + } + i += d->d_reclen; + dents++; ++ if (!d->d_reclen) { ++ fprintf(stderr, "[error: d->d_reclen == 0] "); ++ break; ++ } + } + if (!abbrev(tcp)) + tprintf("}"); |