2010-01-20 Chris Johns <chrisj@rtems.org>

Coverity Id 9
	* libmisc/shell/main_ls.c: Modify conditional to avoid NULL
	dereference.
This commit is contained in:
Joel Sherrill
2010-01-20 14:27:57 +00:00
parent a518defe92
commit 8bffc40b3a
2 changed files with 7 additions and 1 deletions

View File

@@ -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> 2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
Coverity Id 10 Coverity Id 10

View File

@@ -627,7 +627,7 @@ display(rtems_shell_ls_globals* globals, FTSENT *p, FTSENT *list)
np->group = &np->data[ulen + 1]; np->group = &np->data[ulen + 1];
(void)strcpy(np->group, group); (void)strcpy(np->group, group);
if (f_flags) { if (f_flags && flags) {
np->flags = &np->data[ulen + glen + 2]; np->flags = &np->data[ulen + glen + 2];
(void)strcpy(np->flags, flags); (void)strcpy(np->flags, flags);
} }