From: Tobias Brunner Date: Tue, 7 May 2019 12:50:11 +0000 (+0200) Subject: smp: Use correct printf specifier to print SPIs X-Git-Tag: 5.8.0rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ee352a6917aaff18c8ee333c303a10bd38558a3;p=thirdparty%2Fstrongswan.git smp: Use correct printf specifier to print SPIs --- diff --git a/src/libcharon/plugins/smp/smp.c b/src/libcharon/plugins/smp/smp.c index 29d3d2dada..ad848182c7 100644 --- a/src/libcharon/plugins/smp/smp.c +++ b/src/libcharon/plugins/smp/smp.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -229,7 +230,7 @@ static void request_query_ikesa(xmlTextReaderPtr reader, xmlTextWriterPtr writer /* */ local = ike_sa->get_my_host(ike_sa); xmlTextWriterStartElement(writer, "local"); - xmlTextWriterWriteFormatElement(writer, "spi", "%.16llx", + xmlTextWriterWriteFormatElement(writer, "spi", "%.16"PRIx64, be64toh(id->is_initiator(id) ? id->get_initiator_spi(id) : id->get_responder_spi(id))); write_id(writer, "identification", ike_sa->get_my_id(ike_sa)); @@ -246,7 +247,7 @@ static void request_query_ikesa(xmlTextReaderPtr reader, xmlTextWriterPtr writer /* */ remote = ike_sa->get_other_host(ike_sa); xmlTextWriterStartElement(writer, "remote"); - xmlTextWriterWriteFormatElement(writer, "spi", "%.16llx", + xmlTextWriterWriteFormatElement(writer, "spi", "%.16"PRIx64, be64toh(id->is_initiator(id) ? id->get_responder_spi(id) : id->get_initiator_spi(id))); write_id(writer, "identification", ike_sa->get_other_id(ike_sa));