More checks in ELF parser.

Hello, I'm working on the radare2 ELF parser.

I found many bugs on it due to lack of checks on ELF structure fields, which result to segfault (or more 3vil things...).

If you are interested, I'm rewriting the parser (partialy) in the goal to made it more secure and more robust.

Here is the first patch I submit, but there are still bugs, and I need to rewrite other functions.

If you have question on my code, I'm open to discussion ;)

-TOSH-
possible wrong malloc here?