[libgdata] picasaweb: Fix some integer overflow bugs on 32-bit machines
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] picasaweb: Fix some integer overflow bugs on 32-bit machines
- Date: Thu, 29 Aug 2013 05:34:00 +0000 (UTC)
commit 6937287b6c3302397eb92e4e900195d238f00888
Author: Philip Withnall <philip tecnocode co uk>
Date: Wed Aug 28 21:54:44 2013 -0600
picasaweb: Fix some integer overflow bugs on 32-bit machines
Looks like nobody’s previously run the test suite on a 32-bit machine…
gdata/services/picasaweb/gdata-picasaweb-album.c | 2 +-
gdata/services/picasaweb/gdata-picasaweb-file.c | 2 +-
gdata/tests/picasaweb.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdata/services/picasaweb/gdata-picasaweb-album.c
b/gdata/services/picasaweb/gdata-picasaweb-album.c
index 1b1ad11..be1cabe 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-album.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-album.c
@@ -514,7 +514,7 @@ gdata_picasaweb_album_constructor (GType type, guint n_construct_params, GObject
/* Set the edited and timestamp properties to the current time (creation time). bgo#599140
* We don't do this in *_init() since that would cause setting it from parse_xml() to fail
(duplicate element). */
g_get_current_time (&time_val);
- priv->timestamp = time_val.tv_sec * 1000;
+ priv->timestamp = (gint64) time_val.tv_sec * 1000;
priv->edited = time_val.tv_sec;
}
diff --git a/gdata/services/picasaweb/gdata-picasaweb-file.c b/gdata/services/picasaweb/gdata-picasaweb-file.c
index 60f9159..30f9197 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-file.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-file.c
@@ -696,7 +696,7 @@ gdata_picasaweb_file_constructor (GType type, guint n_construct_params, GObjectC
/* Set the edited and timestamp properties to the current time (creation time). bgo#599140
* We don't do this in *_init() since that would cause setting it from parse_xml() to fail
(duplicate element). */
g_get_current_time (&time_val);
- priv->timestamp = time_val.tv_sec * 1000;
+ priv->timestamp = (gint64) time_val.tv_sec * 1000;
priv->edited = time_val.tv_sec;
}
diff --git a/gdata/tests/picasaweb.c b/gdata/tests/picasaweb.c
index a043d9f..1653e3c 100644
--- a/gdata/tests/picasaweb.c
+++ b/gdata/tests/picasaweb.c
@@ -811,7 +811,7 @@ set_up_insert_album (InsertAlbumData *data, gconstpointer service)
gdata_picasaweb_album_set_location (data->album, "Winnipeg, MN");
g_time_val_from_iso8601 ("2002-10-14T09:58:59.643554Z", ×tamp);
- gdata_picasaweb_album_set_timestamp (data->album, timestamp.tv_sec * 1000);
+ gdata_picasaweb_album_set_timestamp (data->album, (gint64) timestamp.tv_sec * 1000);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]