diff options
author | Rob Landley <rob@landley.net> | 2020-04-13 22:32:19 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-04-13 22:32:19 -0500 |
commit | 472599b99bec85ac5bf9df30e03d47744dcaf9d4 (patch) | |
tree | fd1aff3ad2d5b44330397dc31ab5d2ba09467594 | |
parent | 71ae0e1617218820f405bbf79d5d5dc89d5772ee (diff) | |
download | toybox-472599b99bec85ac5bf9df30e03d47744dcaf9d4.tar.gz |
Humor asan.
(ls would read from an uninitalized variable and never use the result because
the test is afterwards, but asan freaks about impurity and unclean quantum
state that's never observed or some such. You read uninitialized but
definitely allocated stack memory into a REGISTER, and then performed
an ADDITION on it to produce a result you never use! For SHAME!)
-rw-r--r-- | toys/posix/ls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/ls.c b/toys/posix/ls.c index 01a64c2d..d9cd90bd 100644 --- a/toys/posix/ls.c +++ b/toys/posix/ls.c @@ -272,7 +272,7 @@ static void listfiles(int dirfd, struct dirtree *indir) } memset(totals, 0, sizeof(totals)); - if (CFG_TOYBOX_DEBUG) memset(len, 0, sizeof(len)); + memset(len, 0, sizeof(len)); // Top level directory was already populated by main() if (!indir->parent) { |