From 67d2ef0428995b991a7edf32358d63e5e7213b8a Mon Sep 17 00:00:00 2001 From: hackbard Date: Mon, 14 Mar 2011 23:36:35 +0100 Subject: [PATCH] corrected build instr + mmap check --- efp_extract.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/efp_extract.c b/efp_extract.c index 7198ef4..bf66065 100644 --- a/efp_extract.c +++ b/efp_extract.c @@ -3,7 +3,7 @@ * * author: hackbard@hackdaworld.org * - * build: gcc -Wall efp_extract -o efp_extract + * build: gcc -Wall efp_extract.c -o efp_extract * usage: ./efp_extract file.efp * chmod 640 file_?? * @@ -99,6 +99,10 @@ int main(int argc,char **argv) { printf("mapping file into memory ...\n"); map=mmap(0,offset[nof-1]+len[nof-1],PROT_READ,MAP_SHARED,fd,0); + if(map==MAP_FAILED) { + perror("mmap"); + return -1; + } for(i=0;i