From Debian bug #917993:
From: Nye Liu <nyet@nyet.org>
Subject: wmbiff: gmail (and many other IMAP servers) now require SNI
Date: Tue, 01 Jan 2019 18:33:51 -0800
wmbiff/gmail imap4: Need new connection to ***@gmail.com@imap.gmail.com
wmbiff/gmail comm: certificate passed time check.
wmbiff/gmail comm: server's certificate (OU=No SNI provided\; please fix your client.,CN=invalid2.invalid) does not match its hostname (imap.gmail.com).
wmbiff/gmail comm: server's certificate does not match its hostname.
wmbiff/gmail comm: to ignore this error, run wmbiff with the -skip-certificate-check option
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
`regulo_atoi` expects a pointer-to-int and `PCU.serverPort` is a
`uint16_t`, so `&PCU.serverPort` is not compatible and we need to use an
`int` temporary variable to avoid endianness problems.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
`addr.sin_addr.s_addr` is a `uint32_t` in NBO, so assigning a
`struct in_addr` cast to `unsigned long` will break on 64-bit big-endian
architectures.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
`addr` is a `struct sockaddr_in`, not a `struct sockaddr`; using `sizeof
var` instead of `sizeof (type)` ensures that the right size is used.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
The CleanupNames() function removed the sender-addresses for deleted
mails, but did not set the namesChanged flag to true. This meant that
if the ticker was displaying the address of a mail which had been
deleted it would continue doing so after the address had been freed.
The code calling Tokenize assumed that if it returned true, value would
not be NULL. However, in the case of a line containing no equals sign:
blah
that would not be the case. Changed Tokenize to return false unless id
and value are both defined.
The mixed-option parsing code includes an assertion that short-form
options have a length of two. However, there is no other validation of
this requirement and some dock-apps do not comply with it, which means
that if one exec's them with an unrecognized option or a mix of short
options, the assertion fails and the app aborts.
For example:
$ /usr/bin/wmail --help | grep '\<display\>'
-display <string> display to use
$ /usr/bin/wmail --blah
wmail: daargs.c:126: contains: Assertion `strlen(needle) == 2' failed.
Aborted
Since there is no explicit statement of this requirement, let's replace
the assertion with a conditional.