Eric Pouech : loader: Protect preloader against ELF file without loadable segments (clang).

Alexandre Julliard julliard at winehq.org
Mon Mar 28 14:21:59 CDT 2011


Module: wine
Branch: master
Commit: 7b544af170e3a89d606f41ae4b3bd5c5b4f5f167
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7b544af170e3a89d606f41ae4b3bd5c5b4f5f167

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Sat Mar 26 12:16:51 2011 +0100

loader: Protect preloader against ELF file without loadable segments (clang).

---

 loader/preloader.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/loader/preloader.c b/loader/preloader.c
index e1c2276..a94c52c 100644
--- a/loader/preloader.c
+++ b/loader/preloader.c
@@ -788,6 +788,8 @@ static void map_so_lib( const char *name, struct wld_link_map *l)
     }
 
     /* Now process the load commands and map segments into memory.  */
+    if (!nloadcmds)
+        fatal_error( "%s: no segments to load\n", name );
     c = loadcmds;
 
     /* Length of the sections to be loaded.  */




More information about the wine-cvs mailing list