diff options
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/libmisc/shell/hexdump-parse.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index ae2c38edb5..9b205e5556 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,11 @@ 2010-01-20 Chris Johns <chrisj@rtems.org> + Coverity Id 6 + * libmisc/shell/hexdump-parse.c: Modify conditional to avoid NULL + dereference. + +2010-01-20 Chris Johns <chrisj@rtems.org> + Coverity Id 9 * libmisc/shell/main_ls.c: Modify conditional to avoid NULL dereference. diff --git a/cpukit/libmisc/shell/hexdump-parse.c b/cpukit/libmisc/shell/hexdump-parse.c index 1fc06c0efa..945314cb0f 100644 --- a/cpukit/libmisc/shell/hexdump-parse.c +++ b/cpukit/libmisc/shell/hexdump-parse.c @@ -230,8 +230,10 @@ rewrite(rtems_shell_hexdump_globals* globals, FS *fs) err(exit_jump, 1, NULL); if (!fu->nextpr) fu->nextpr = pr; - else - *nextpr = pr; + else { + if (nextpr) + *nextpr = pr; + } /* Skip preceding text and up to the next % sign. */ for (p1 = fmtp; *p1 && *p1 != '%'; ++p1); |