projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53538a8
)
Fix possible NULL pointer dereference in afh_get_header().
author
Andre Noll
<maan@systemlinux.org>
Tue, 17 Mar 2009 22:58:58 +0000
(23:58 +0100)
committer
Andre Noll
<maan@systemlinux.org>
Tue, 17 Mar 2009 22:58:58 +0000
(23:58 +0100)
afh_common.c
patch
|
blob
|
history
diff --git
a/afh_common.c
b/afh_common.c
index aa7f3d92444faddf9d193aa6c2b86fe04b697d14..8c0eed2731837da4e8d3847d1d3d6caeddfe5102 100644
(file)
--- a/
afh_common.c
+++ b/
afh_common.c
@@
-256,9
+256,10
@@
uint32_t afh_get_largest_chunk_size(struct afh_info *afhi)
*/
void afh_get_header(struct afh_info *afhi, void *map, const char **buf, size_t *len)
{
- if (!map || !afhi || !
afhi->header_len) {
+ if (!map || !afhi || !afhi->header_len) {
*buf = NULL;
*len = 0;
+ return;
}
*len = afhi->header_len;
*buf = map + afhi->header_offset;