e2fsprogs/e2fsck
Eric Sandeen f2fe5da31d e2fsprogs: fix potential null ptr defef in check_for_modules()
The coverity scanner found this one.

If a line in modules.dep has a ":" but no "/" then:

                if ((cp = strchr(buf, ':')) != NULL)
                        *cp = 0;
                else
                        continue;
                if ((cp = strrchr(buf, '/')) != NULL)
                        cp++;
                /* XXX else cp is still null */
                i = strlen(cp);

... we will deref a null pointer (cp).  This can be
demonstrated by putting a line like:

foo.ko:

into modules.dep.  The below change just says that if no "/" is
found, treat the whole string as the module name.

Addresses-Red-Hat-Bugzilla: #486997

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-03-06 02:37:33 -05:00
..
CHANGES Many files: 1997-04-26 13:21:57 +00:00
Makefile.in e2fsck: Fix build of e2fsck.profiled if profiling is enabled 2008-11-15 12:12:57 -05:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
argv_parse.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
argv_parse.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
badblocks.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
crc32.c Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
crc32defs.h Only use __builtin_expect if __GNUC__ > 3 2008-07-13 16:06:56 -04:00
dict.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
dict.h Fixx gcc -Wall nitpicks. 2003-07-06 00:36:48 -04:00
dirinfo.c Fix e2fsck segfault on very badly damaged filesystems 2007-07-11 13:42:43 -04:00
dx_dirinfo.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
e2fsck.8.in Fix spelling mistake in e2fsck man page 2008-10-01 20:27:41 -04:00
e2fsck.c e2fsck: When repacking directories, leave slack space for more efficiency 2008-12-25 17:59:36 -05:00
e2fsck.conf.5.in e2fsck: When repacking directories, leave slack space for more efficiency 2008-12-25 17:59:36 -05:00
e2fsck.conf.ubuntu Add Ubuntu-specific e2fsck.conf file to work around Ubuntu issues 2007-12-05 21:01:22 -05:00
e2fsck.h e2fsck: When repacking directories, leave slack space for more efficiency 2008-12-25 17:59:36 -05:00
ea_refcount.c Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
ehandler.c e2fsck: exit from preenhalt if IO errors were encountered 2008-10-12 23:12:22 -04:00
emptydir.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
extend.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
flushb.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
gen_crc32table.c Fix gcc -Wall warnings in e2fsck 2008-06-07 11:04:10 -04:00
iscan.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
jfs_user.h e2fsck: Fix journal replay for block sizes greater than 8k 2009-01-02 18:14:42 -05:00
journal.c e2fsck: Fix journal replay for block sizes greater than 8k 2009-01-02 18:14:42 -05:00
message.c Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
mtrace.awk Many files: 1997-04-26 13:21:57 +00:00
mtrace.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
mtrace.h ChangeLog, super.c: 2001-01-12 21:05:57 +00:00
pass1.c e2fsck: Fix an unhandled corruption case in scan_extent_node() 2008-12-25 22:42:38 -05:00
pass1b.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
pass2.c e2fsck: Don't cancel the fsck run after clearing an errant INODE_UNINIT flag 2008-11-26 20:41:26 -05:00
pass3.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
pass4.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
pass5.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
problem.c e2fsck: Add missing newlines when reporting errors in pass 3A 2009-01-26 16:41:46 -05:00
problem.h e2fsck: Fix an unhandled corruption case in scan_extent_node() 2008-12-25 22:42:38 -05:00
problemP.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
prof_err.et Add the profile library code to e2fsck 2005-12-30 23:57:32 -05:00
profile.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
profile.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
profile_helpers.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
profile_helpers.h Simplify profile core functionality 2006-01-02 22:04:41 -05:00
recovery.c Fix gcc -Wall warnings in e2fsck 2008-06-07 11:04:10 -04:00
region.c Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
rehash.c e2fsck: When repacking directories, leave slack space for more efficiency 2008-12-25 17:59:36 -05:00
revoke.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
scantest.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
super.c e2fsck: Add superblock check to make sure s_first_ino is valid 2009-01-22 15:52:50 -05:00
unix.c e2fsck: In verbose mode, distinguish between fragmented directories/files 2008-12-08 21:33:11 -05:00
util.c e2fsprogs: fix potential null ptr defef in check_for_modules() 2009-03-06 02:37:33 -05:00