From 021c7dd0d29ef05b45d875bf31e66448248b833d Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Thu, 16 Jun 2016 23:01:10 +0900 Subject: [PATCH] Use strstr instead of strnstr. --- gc_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gc_heap.c b/gc_heap.c index 469051a3..19b9f158 100644 --- a/gc_heap.c +++ b/gc_heap.c @@ -495,7 +495,7 @@ static void* load_image_fn(sexp ctx, sexp dl, sexp name) { sexp_dl_handle(dl) = dlopen(file_name, RTLD_LAZY); if (!sexp_dl_handle(dl)) { for (ls = sexp_global(ctx, SEXP_G_MODULE_PATH); sexp_pairp(ls); ls=sexp_cdr(ls)) { - if (strnstr(file_name, sexp_string_data(sexp_car(ls)), len+1)) { + if (strstr(file_name, sexp_string_data(sexp_car(ls))) == file_name) { rel_name = file_name + sexp_string_size(sexp_car(ls)); while (*rel_name == '/') ++rel_name;