summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2013-08-28 21:54:44 -0600
committerPhilip Withnall <philip@tecnocode.co.uk>2013-08-28 22:33:21 -0600
commit6937287b6c3302397eb92e4e900195d238f00888 (patch)
tree1008c1bd3183d6ad92b19ea5a9886f432f01452c
parent035979496f91747839c219d27627c6393f36230c (diff)
downloadlibgdata-6937287b6c3302397eb92e4e900195d238f00888.tar.gz
picasaweb: Fix some integer overflow bugs on 32-bit machines
Looks like nobody’s previously run the test suite on a 32-bit machine…
-rw-r--r--gdata/services/picasaweb/gdata-picasaweb-album.c2
-rw-r--r--gdata/services/picasaweb/gdata-picasaweb-file.c2
-rw-r--r--gdata/tests/picasaweb.c2
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 1b1ad11b..be1cabed 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 60f9159e..30f91978 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 a043d9fe..1653e3cb 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", &timestamp);
- 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