alecmuffett / certificate-transparency

Automatically exported from code.google.com/p/certificate-transparency
0 stars 0 forks source link

Bad logic in src/logs/Cert::ExtensionStructure() #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Relevant code:

  *ext_struct = X509_get_ext_d2i(x509_, extension_nid, &crit, NULL);

  if (ext_struct == NULL) {
    if (crit != -1) {
      LOG(WARNING) << "Corrupt extension data";

The check "ext_struct == NULL" is invalid.  (If it is NULL, the previous line 
would segfault.)  Presumably this should be "*ext_struct == NULL".

What version of the product are you using? On what operating system?

Latest code at 
https://code.google.com/p/certificate-transparency/source/browse/src/log/cert.cc

Original issue reported on code.google.com by traw...@gmail.com on 10 Feb 2014 at 5:17

GoogleCodeExporter commented 9 years ago
The fix is out for review in https://codereview.appspot.com/68190045

Original comment by er...@google.com on 24 Feb 2014 at 5:44

GoogleCodeExporter commented 9 years ago

Original comment by er...@google.com on 25 Feb 2014 at 11:14

GoogleCodeExporter commented 9 years ago
Fixed in 
https://code.google.com/p/certificate-transparency/source/detail?r=dd00c6e4fd947
ca905a74ead893803046c5de857

Original comment by er...@google.com on 25 Feb 2014 at 11:14