From fea8122ed35c8a7895fc1195d4257fb6c42fe128 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Wed, 14 May 2014 17:48:04 +0000 Subject: Fixed hashtable corruption because of dirty code directly modifying the host address in memory, leading to have hashtable positions not anymore valid. This issue was especially triggered when a redirect was processed ("Warning moved treated for .." messages) * closes: #43 --- src/htsparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/htsparse.c') diff --git a/src/htsparse.c b/src/htsparse.c index e12e94c..b3778bc 100644 --- a/src/htsparse.c +++ b/src/htsparse.c @@ -3606,7 +3606,7 @@ int hts_mirror_check_moved(htsmoduleStruct * str, urladr, urlfil, mov_adr, mov_fil); // canceller lien actuel error = 1; - strcpybuff(liens[ptr]->adr, "!"); // caractère bidon (invalide hash) + hash_invalidate_entry(hashptr, ptr); // invalidate hashtable entry // noter NOUVEAU lien //xxc xxc // set_prio_to=0+1; // protection if the moved URL is an html page!! @@ -3742,7 +3742,7 @@ int hts_mirror_check_moved(htsmoduleStruct * str, // // canceller lien actuel error = 1; - strcpybuff(liens[ptr]->adr, "!"); // caractère bidon (invalide hash) + hash_invalidate_entry(hashptr, ptr); // invalidate hashtable entry // } else { // oups erreur, plus de mémoire!! printf("PANIC! : Not enough memory [%d]\n", __LINE__); -- cgit v1.2.3