diff options
| author | Ulrich Drepper <[email protected]> | 2006-05-17 05:28:36 +0000 |
|---|---|---|
| committer | Ulrich Drepper <[email protected]> | 2006-05-17 05:28:36 +0000 |
| commit | a1690688cee19199afb1fb44da4546750be622cc (patch) | |
| tree | 7f0606539aac221862a4233186394600c8445b47 /libdwfl/dwfl_addrmodule.c | |
| parent | 3a5052a8e16f38f8a0d0b3c5925e743608036ed9 (diff) | |
Don't crash if ->modules is NULL.
Diffstat (limited to 'libdwfl/dwfl_addrmodule.c')
| -rw-r--r-- | libdwfl/dwfl_addrmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libdwfl/dwfl_addrmodule.c b/libdwfl/dwfl_addrmodule.c index bd95a87f..98c4b39f 100644 --- a/libdwfl/dwfl_addrmodule.c +++ b/libdwfl/dwfl_addrmodule.c @@ -1,5 +1,5 @@ /* Find module containing address. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2006 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -52,7 +52,7 @@ Dwfl_Module * dwfl_addrmodule (Dwfl *dwfl, Dwarf_Addr address) { - if (dwfl == NULL) + if (dwfl == NULL || dwfl->modules == NULL) return NULL; /* Do binary search on the array indexed by module load address. */ |
