Skip to content

libmm-glib,common-helpers: don't assume new_from_unix_utc() always succeeds

The g_date_time_new_from_unix_utc() method in glib2 may fail if the given timestamp is too far into the future. The value is supposed to be seconds since unix time origin, but internally it will be converted into usecs, so any value longer than G_MAXINT64 / USEC_PER_SECOND isn't allowed.

This is currently used in the CLI, and we're anyway ignoring the error returned in that case, but at least it won't crash if it ever happens.

Merge request reports