[PATCH] [loader]: protect preloader against ELF file without loadable segments (clang)

Eric Pouech eric.pouech at orange.fr
Sat Mar 26 06:16:51 CDT 2011




A+
---

 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-patches mailing list