diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2022-03-12 16:45:47 +0000 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2022-03-12 16:45:47 +0000 |
commit | baa72f144c15896a40c794b967854f0508459a20 (patch) | |
tree | 6ab4d8ff00ebf399e72f2dcbc3491c0538b5403a /WWW/Library | |
parent | d9c9f31fcbfa46070186e3f43a76fac3786fd824 (diff) | |
download | lynx-snapshots-baa72f144c15896a40c794b967854f0508459a20.tar.gz |
snapshot of project "lynx", label v2-9-0dev_10c
Diffstat (limited to 'WWW/Library')
-rw-r--r-- | WWW/Library/Implementation/HTFTP.c | 4 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFormat.c | 6 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTMIME.c | 4 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTNews.c | 4 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTString.c | 4 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTTCP.c | 18 |
6 files changed, 20 insertions, 20 deletions
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c index 7403326d..092c2076 100644 --- a/WWW/Library/Implementation/HTFTP.c +++ b/WWW/Library/Implementation/HTFTP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTFTP.c,v 1.142 2020/02/26 23:40:14 tom Exp $ + * $LynxId: HTFTP.c,v 1.143 2022/03/12 12:06:13 tom Exp $ * * File Transfer Protocol (FTP) Client * for a WorldWideWeb browser @@ -1175,12 +1175,12 @@ static int get_listen_socket(void) #ifdef INET6 /* query address family of control connection */ + memset(&soc_A, 0, sizeof(soc_A)); slen = (LY_SOCKLEN) sizeof(soc_A); if (getsockname(control->socket, SOCKADDR_OF(soc_A), &slen) < 0) { return HTInetStatus("getsockname failed"); } af = SOCKADDR_OF(soc_A)->sa_family; - memset(&soc_A, 0, sizeof(soc_A)); #endif /* INET6 */ /* Create internet socket diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c index c4e4f4a6..a1ad71ae 100644 --- a/WWW/Library/Implementation/HTFormat.c +++ b/WWW/Library/Implementation/HTFormat.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTFormat.c,v 1.91 2019/01/02 23:25:10 tom Exp $ + * $LynxId: HTFormat.c,v 1.92 2022/03/12 14:40:38 tom Exp $ * * Manage different file formats HTFormat.c * ============================= @@ -1183,9 +1183,7 @@ static int HTZzFileCopy(FILE *zzfp, HTStream *sink) */ targetClass = *(sink->isa); /* Copy pointers to procedures */ - s.zalloc = Z_NULL; - s.zfree = Z_NULL; - s.opaque = Z_NULL; + memset(&s, 0, sizeof(s)); status = inflateInit(&s); if (status != Z_OK) { CTRACE((tfp, "HTZzFileCopy inflateInit() %s\n", zError(status))); diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c index cce691c2..fde89a64 100644 --- a/WWW/Library/Implementation/HTMIME.c +++ b/WWW/Library/Implementation/HTMIME.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTMIME.c,v 1.101 2021/06/29 22:01:12 tom Exp $ + * $LynxId: HTMIME.c,v 1.102 2022/03/12 14:47:02 tom Exp $ * * MIME Message Parse HTMIME.c * ================== @@ -2394,7 +2394,7 @@ void HTmmdecode(char **target, if ((buf = typeMallocn(char, strlen(source) + 1)) == 0) outofmem(__FILE__, "HTmmdecode"); - for (s = source, u = buf; *s;) { + for (s = source, *(u = buf) = '\0'; *s;) { if (!strncasecomp(s, "=?ISO-2022-JP?B?", 16)) { base64 = 1; } else { diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c index c6c25636..ad528eae 100644 --- a/WWW/Library/Implementation/HTNews.c +++ b/WWW/Library/Implementation/HTNews.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTNews.c,v 1.78 2021/06/09 19:29:36 tom Exp $ + * $LynxId: HTNews.c,v 1.79 2022/03/12 15:45:16 tom Exp $ * * NEWS ACCESS HTNews.c * =========== @@ -1609,7 +1609,7 @@ static int read_list(char *arg) PUTS("Newsgroups"); END(HTML_H1); PUTC('\n'); - p = line; + *(p = line) = '\0'; START(HTML_DLC); PUTC('\n'); while (!done) { diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c index 78054d7b..3cb83588 100644 --- a/WWW/Library/Implementation/HTString.c +++ b/WWW/Library/Implementation/HTString.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTString.c,v 1.81 2021/06/09 20:16:06 tom Exp $ + * $LynxId: HTString.c,v 1.82 2022/03/12 12:19:10 Gisle.Vanem Exp $ * * Case-independent string comparison HTString.c * @@ -677,7 +677,7 @@ PUBLIC_IF_FIND_LEAKS char *StrAllocVsprintf(char **pstr, char *fmt_ptr; #endif /* SAVE_TIME_NOT_SPACE */ size_t have, need; - char *dst_ptr = *pstr; + char *dst_ptr = pstr ? *pstr : NULL; const char *format = fmt; if (isEmpty(fmt)) diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index c4d648ac..29529c7e 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTCP.c,v 1.160 2021/06/08 23:44:43 tom Exp $ + * $LynxId: HTTCP.c,v 1.162 2022/03/12 16:45:47 tom Exp $ * * Generic Communication Code HTTCP.c * ========================== @@ -1888,9 +1888,9 @@ int HTDoConnect(const char *url, HTSACat(&socks5_new_url, socks5_proxy); url = socks5_new_url; - socks5_protocol = HTSprintf0(NULL, - gettext("(for %s at %s) SOCKS5"), - protocol, socks5_host); + HTSprintf0(&socks5_protocol, + gettext("(for %s at %s) SOCKS5"), + protocol, socks5_host); protocol = socks5_protocol; } #ifndef INET6 @@ -2032,6 +2032,8 @@ int HTDoConnect(const char *url, * write service procedure. This will be * the normal case. */ + CTRACE((tfp, "connect(): status: %d, SOCK_ERRNO: %d\n", status, SOCKET_ERRNO)); + if ((status < 0) && (SOCKET_ERRNO == EINPROGRESS #ifdef EAGAIN @@ -2091,7 +2093,7 @@ int HTDoConnect(const char *url, * If we suspend, then it is possible that select will be * interrupted. Allow for this possibility. - JED */ - if ((ret == -1) && (errno == EINTR)) + if ((ret == -1) && (SOCKET_ERRNO == EINTR)) continue; #ifdef SOCKET_DEBUG_TRACE @@ -2273,7 +2275,7 @@ int HTDoConnect(const char *url, pbuf[0] = 0x05; /* VER: protocol version: X'05' */ pbuf[1] = 0x01; /* NMETHODS: 1 */ pbuf[2] = 0x00; /* METHOD: X'00' NO AUTHENTICATION REQUIRED */ - if (write(*s, pbuf, 3) != 3) { + if (NETWRITE(*s, (char *) pbuf, 3) != 3) { goto report_system_err; } else if (HTDoRead(*s, pbuf, 2) != 2) { goto report_system_err; @@ -2298,7 +2300,7 @@ int HTDoConnect(const char *url, memcpy(&pbuf[i], (unsigned char *) &x, sizeof x); i += (unsigned) sizeof(x); } - if ((size_t) write(*s, pbuf, i) != i) { + if ((size_t) NETWRITE(*s, (char *) pbuf, i) != i) { goto report_system_err; } else if ((unsigned) HTDoRead(*s, pbuf, 4) != 4) { goto report_system_err; @@ -2534,7 +2536,7 @@ int HTDoRead(int fildes, break; } #else /* UNIX */ - result = SOCKET_READ(fildes, buf, nbyte); + result = NETREAD(fildes, (char *) buf, nbyte); #endif /* !UNIX */ #endif /* UCX && VAXC */ } |