aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Aleaxander <Aleaxander@gmail.com>2009-05-25 10:56:43 +0800
committerLiu Aleaxander <Aleaxander@gmail.com>2009-05-25 10:56:43 +0800
commitdb5b53ba9b9891bdc439d53b99bde6070c0022ee (patch)
treef95e1970239081e1b9da2d4c47814afeeefa006c
parentbc5ae77ff5ccf1cee85282d14e6675a509a04ef6 (diff)
parentca5116774bdb3d203e2db68736b3645023d50a43 (diff)
downloaddevel-db5b53ba9b9891bdc439d53b99bde6070c0022ee.tar.gz
devel-db5b53ba9b9891bdc439d53b99bde6070c0022ee.tar.xz
devel-db5b53ba9b9891bdc439d53b99bde6070c0022ee.zip
Merge branch 'isolinux'
-rw-r--r--isolinux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/isolinux.c b/isolinux.c
index cb83f10..30bff71 100644
--- a/isolinux.c
+++ b/isolinux.c
@@ -15,7 +15,7 @@
#include <stdio.h>
#include <string.h>
-#include <malloc.h>
+
#define DEBUG 1
@@ -427,6 +427,9 @@ int do_search_dir(struct dir_t *dir, char *name, void **res)
file_pos += de_len;
}
+ if ( file_pos >= dir->dir_len )
+ return 0; /* not found */
+
if ( *(name+de_name_len) && (*(name+de_name_len) != '/' ) ) {
printf("Something wrong happened during searching file %s\n", name);