X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/14c29200cb58d3c4a0830265f2433849781858d0..81cdd3c421bac745cf161cf04d161cb65a277015:/url.c diff --git a/url.c b/url.c index 7ee6773..58c3642 100644 --- a/url.c +++ b/url.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000 Thomas Roessler + * Copyright (C) 2000-2,2004 Thomas Roessler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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;