X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/19304f7c526fbe36ba0db2fb80bcaf3bd974d81d..d1b23f9d0c0856da1d869c58da0f092e4c73ce89:/url.c diff --git a/url.c b/url.c index 5155371..58c3642 100644 --- a/url.c +++ b/url.c @@ -144,7 +144,8 @@ static char *ciss_parse_userhost (ciss_url_t *ciss, char *src) if ((p = strchr (t, ':'))) { *p++ = '\0'; - ciss->port = atoi (p); + if (mutt_atos (p, (short*) &ciss->port) < 0) + return NULL; } else ciss->port = 0; @@ -165,7 +166,8 @@ int url_parse_ciss (ciss_url_t *ciss, char *src) tmp = strchr (src, ':') + 1; - ciss->path = ciss_parse_userhost (ciss, tmp); + if ((ciss->path = ciss_parse_userhost (ciss, tmp)) == NULL) + return -1; url_pct_decode (ciss->path); return 0;