summaryrefslogtreecommitdiff
path: root/src/htscore.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-05-14 17:48:04 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-05-14 17:48:04 +0000
commitfea8122ed35c8a7895fc1195d4257fb6c42fe128 (patch)
tree37736ffc0315ff3696a1b3ea036dfb697083f6a2 /src/htscore.c
parent7323230eb3c8fc4818d0cf34974497b3782a7279 (diff)
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
Diffstat (limited to 'src/htscore.c')
-rw-r--r--src/htscore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/htscore.c b/src/htscore.c
index 94ed251..6fe302a 100644
--- a/src/htscore.c
+++ b/src/htscore.c
@@ -2355,7 +2355,7 @@ void host_ban(httrackp * opt, lien_url ** liens, int ptr, int lien_tot,
if (strfield2(jump_identification(liens[i]->adr), host)) { // host
hts_log_print(opt, LOG_DEBUG, "Cancel: %s%s", liens[i]->adr,
liens[i]->fil);
- strcpybuff(liens[i]->adr, "!"); // cancel (invalide hash)
+ hash_invalidate_entry(opt->hash, i); // invalidate hashtable entry
// on efface pas le hash, because si on rencontre le lien, reverif sav..
}
} else {