Control: tags 859784 -pending Control: tags 897882 -pending Sebastian Andrzej Siewior wrote...
> On 2018-10-27 18:36:12 [+0200], Christoph Biedl wrote: > > +--- a/ipseckey.c > > ++++ b/ipseckey.c > > +@@ -111,8 +111,11 @@ > > + default: > > + strcpy(gw, "??"); > > + } > > ++#pragma GCC diagnostic push > > ++#pragma GCC diagnostic ignored "-Wformat-truncation" > > + snprintf(s, 1024, "( %d %d %d %s ... )", > > + rr->precedence, rr->gateway_type, rr->algorithm, gw); > > ++#pragma GCC diagnostic pop > > This looks odd. There has to be a better way of dealing with this than > just shutting off the warning so things compile again. Well, i could move the fix for the underlying problem around, resulting in a more subtle way to deal with it. Otherwise there is no difference: Upstream took into account an information loss might happen - by using a limit on the inet_ntop invocations a few lines above, and eventually that snprintf. Although basically a good idea, the strict gcc checking brings trouble, especially since the warning is treated as an error. So instead of disabling that globally, possibly introducing real issues, I decided to do that only at that particular place. Another solution (not checked) was to limit gw[] and inet_ntop to, say, 768 characters. Shouldn't do any change. > > +--- a/dnskey.c > > ++++ b/dnskey.c > > +@@ -154,6 +154,7 @@ > > + unsigned int e_bytes; > > + unsigned char *pk; > > + int l; > > ++ BIGNUM *n, *e; > > + > > + rsa = RSA_new(); > > + if (!rsa) > > +@@ -174,11 +175,12 @@ > > + if (l < e_bytes) /* public key is too short */ > > + goto done; > > + > > +- rsa->e = BN_bin2bn(pk, e_bytes, NULL); > > ++ e = BN_bin2bn(pk, e_bytes, NULL); > > BN_bin2bn() and EVP_MD_CTX_new() which were introduced as part of this > patch may return NULL. Not a single instance in the patch checks the > return value. This is just sloppy. These are worse, though. I'll cancel the upload so there's time for improvement. The original submitter already got some feedback (probably by you) upstream. Christoph
signature.asc
Description: PGP signature