loader: Protect preloader against ELF file without loadable segments (clang).
authorEric Pouech <eric.pouech@orange.fr>
Sat, 26 Mar 2011 11:16:51 +0000 (12:16 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 28 Mar 2011 15:24:53 +0000 (17:24 +0200)
loader/preloader.c

index e1c227676b2a800c36d651cbca0f4459ccb1a2e0..a94c52cf146bd7090fe61532ce66798dd13c2383 100644 (file)
@@ -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.  */