[epiphany/gnome-3-26] 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/gnome-3-26] sync-crypto: Use PRIu64 macro to print unsigned longs
- Date: Mon, 6 Nov 2017 14:01:30 +0000 (UTC)
commit 0527a256063415c3b8b4a20c8af2ac910313e73a
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 38fea5b..aacee71 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]