[epiphany] sync-crypto: Use PRIu64 macro to print unsigned longs
- From: Gabriel Ivașcu <gabrielivascu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] sync-crypto: Use PRIu64 macro to print unsigned longs
- Date: Mon, 6 Nov 2017 13:58:53 +0000 (UTC)
commit 1bde93ab5f59a31b74d2378ff7c19b9b9c257613
Author: Gabriel Ivascu <gabrielivascu gnome org>
Date: Mon Nov 6 09:55:34 2017 +0200
sync-crypto: Use PRIu64 macro to print unsigned longs
Prevent failure for platforms where longs are not 8 bytes.
https://bugzilla.gnome.org/show_bug.cgi?id=789656
lib/sync/ephy-sync-crypto.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/sync/ephy-sync-crypto.c b/lib/sync/ephy-sync-crypto.c
index e837aec..9b17c89 100644
--- a/lib/sync/ephy-sync-crypto.c
+++ b/lib/sync/ephy-sync-crypto.c
@@ -919,7 +919,7 @@ ephy_sync_crypto_create_assertion (const char *certificate,
/* Encode the header and body to base64 url safe and join them. */
expires_at = g_get_real_time () / 1000 + seconds * 1000;
- body = g_strdup_printf ("{\"exp\": %lu, \"aud\": \"%s\"}", expires_at, audience);
+ body = g_strdup_printf ("{\"exp\": %"PRIu64", \"aud\": \"%s\"}", expires_at, audience);
body_b64 = ephy_sync_utils_base64_urlsafe_encode ((guint8 *)body, strlen (body), TRUE);
header_b64 = ephy_sync_utils_base64_urlsafe_encode ((guint8 *)header, strlen (header), TRUE);
to_sign = g_strdup_printf ("%s.%s", header_b64, body_b64);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]