Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0f196d
)
libext2fs: Potential null ptr deref in undo_err_handler_init
author
Eric Sandeen
<sandeen@redhat.com>
Fri, 16 Sep 2011 20:49:21 +0000
(15:49 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Fri, 16 Sep 2011 22:43:04 +0000
(18:43 -0400)
In the !undo_io_backing_manager case, undo_err_handler_init
will be passed a null data->real, which will be dereferenced.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/undo_io.c
patch
|
blob
|
history
diff --git
a/lib/ext2fs/undo_io.c
b/lib/ext2fs/undo_io.c
index
454f3b6
..
da1cf45
100644
(file)
--- a/
lib/ext2fs/undo_io.c
+++ b/
lib/ext2fs/undo_io.c
@@
-400,7
+400,8
@@
static errcode_t undo_open(const char *name, int flags, io_channel *channel)
* setup err handler for read so that we know
* when the backing manager fails do short read
*/
- undo_err_handler_init(data->real);
+ if (data->real)
+ undo_err_handler_init(data->real);
*channel = io;
return 0;