Fix BIO_printf format warnings
[oweals/openssl.git] / crypto / ct / ct_prn.c
index 2786746997b364b5741493ba4e0ba4b9337c5d9b..62d01238cd9010264432ad0a984db661d6f53fbd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
  *
- * Licensed under the OpenSSL license (the "License").  You may not use
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
@@ -41,7 +41,7 @@ static void timestamp_print(uint64_t timestamp, BIO *out)
      * characters long with a final Z. Update it with fractional seconds.
      */
     BIO_snprintf(genstr, sizeof(genstr), "%.14s.%03dZ",
-                 ASN1_STRING_data(gen), (unsigned int)(timestamp % 1000));
+                 ASN1_STRING_get0_data(gen), (unsigned int)(timestamp % 1000));
     if (ASN1_GENERALIZEDTIME_set_string(gen, genstr))
         ASN1_GENERALIZEDTIME_print(out, gen);
     ASN1_GENERALIZEDTIME_free(gen);