summaryrefslogtreecommitdiff
path: root/src/htstools.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-08-12 13:42:55 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-08-12 13:42:55 +0000
commit4e903579b22f3698934294370f076119576041ab (patch)
treeb2007c09c0994a8a3c2d1aba4c8c04ae540daf9a /src/htstools.c
parente77141ceaefb55f427edcfb777f5f1a96b885583 (diff)
Big cleanup in core heap hashtable code, rewritten using new fancy hashtables.
Diffstat (limited to 'src/htstools.c')
-rw-r--r--src/htstools.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/htstools.c b/src/htstools.c
index 255a1a2..7c543f6 100644
--- a/src/htstools.c
+++ b/src/htstools.c
@@ -187,6 +187,12 @@ int ident_url_relatif(const char *lien, const char *origin_adr,
// On forme l'URL complète à partie de l'url actuelle
// et du chemin actuel si besoin est.
+ // sanity check
+ if (origin_adr == NULL || origin_fil == NULL
+ || *origin_adr == '\0' || *origin_fil == '\0') {
+ return -1;
+ }
+
// copier adresse
if (((int) strlen(origin_adr) < HTS_URLMAXSIZE)
&& ((int) strlen(origin_fil) < HTS_URLMAXSIZE)