diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-01-20 14:27:57 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-01-20 14:27:57 +0000 |
commit | 8bffc40b3a6b62ae993123c5fc16e9e2c5800ad8 (patch) | |
tree | 1a66ff6ac644c251a1a0f3b07dd04f233eee361a /cpukit | |
parent | 2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-8bffc40b3a6b62ae993123c5fc16e9e2c5800ad8.tar.bz2 |
2010-01-20 Chris Johns <chrisj@rtems.org>
Coverity Id 9
* libmisc/shell/main_ls.c: Modify conditional to avoid NULL
dereference.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/libmisc/shell/main_ls.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index f5c25c6dde..ae2c38edb5 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2010-01-20 Chris Johns <chrisj@rtems.org> + + Coverity Id 9 + * libmisc/shell/main_ls.c: Modify conditional to avoid NULL + dereference. + 2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com> Coverity Id 10 diff --git a/cpukit/libmisc/shell/main_ls.c b/cpukit/libmisc/shell/main_ls.c index ace56411de..f1cbbcfc91 100644 --- a/cpukit/libmisc/shell/main_ls.c +++ b/cpukit/libmisc/shell/main_ls.c @@ -627,7 +627,7 @@ display(rtems_shell_ls_globals* globals, FTSENT *p, FTSENT *list) np->group = &np->data[ulen + 1]; (void)strcpy(np->group, group); - if (f_flags) { + if (f_flags && flags) { np->flags = &np->data[ulen + glen + 2]; (void)strcpy(np->flags, flags); } |