Note that gnutls is picky in regard to what it accepts as the server name - it
MUST be a domain name. IP addresses are not supported according to the
documentation.
Hence, filter out IP addresses and hope that whatever is not recognized as
such an address is actually a domain name. This will probably fail for more
exotic addresses (especially in IPv6 realm), but wiring up a full-blown parser
is too much effort and SSL plugins are not part of purple-3 anyway.
Fixes #17300
/* untar.c */
/*#define VERSION "1.4"*/
/* DESCRIPTION:
* Untar extracts files from an uncompressed tar archive, or one which
* has been compressed with gzip. Usually such archives will have file
* names that end with ".tar" or ".tgz" respectively, although untar
* doesn't depend on any naming conventions. For a summary of the
* command-line options, run untar with no arguments.
*
* HOW TO COMPILE:
* Untar doesn't require any special libraries or compile-time flags.
* A simple "cc untar.c -o untar" (or the local equivalent) is
* sufficient. Even "make untar" works, without needing a Makefile.
* For Microsoft Visual C++, the command is "cl /D_WEAK_POSIX untar.c"
* (for 32 bit compilers) or "cl /F 1400 untar.c" (for 16-bit).
*
* IF YOU SEE COMPILER WARNINGS, THAT'S NORMAL; you can ignore them.
* Most of the warnings could be eliminated by adding #include <string.h>
* but that isn't portable -- some systems require <strings.h> and
* <malloc.h>, for example. Because <string.h> isn't quite portable,
* and isn't really necessary in the context of this program, it isn't
* included.
*
* PORTABILITY:
* Untar only requires the <stdio.h> header. It uses old-style function
* definitions. It opens all files in binary mode. Taken together,
* this means that untar should compile & run on just about anything.
*
* If your system supports the POSIX chmod(2), utime(2), link(2), and
* symlink(2) calls, then you may wish to compile with -D_POSIX_SOURCE,
* which will enable untar to use those system calls to restore the
* timestamp and permissions of the extracted files, and restore links.
* (For Linux, _POSIX_SOURCE is always defined.)
*
* For systems which support some POSIX features but not enough to support
* -D_POSIX_SOURCE, you might be able to use -D_WEAK_POSIX. This allows
* untar to restore time stamps and file permissions, but not links.
* This should work for Microsoft systems, and hopefully others as well.
*
* AUTHOR & COPYRIGHT INFO:
* Written by Steve Kirkendall, kirkenda@cs.pdx.edu
* Placed in public domain, 6 October 1995
*
* Portions derived from inflate.c -- Not copyrighted 1992 by Mark Adler
* version c10p1, 10 January 1993
*
* Altered by Herman Bloggs <hermanator12002@yahoo.com>
* April 4, 2003
* Changes: Stripped out gz compression code, added better interface for