From: Sergio Villar Senin Date: Fri, 7 Nov 2008 18:44:55 +0000 (+0000) Subject: * Fixes NB#91650, fixes a potential problem with strftime X-Git-Tag: git_migration_finished~1048 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=a6ff5269ddd912e12602d34a7bc7429711e84b61;hp=f8fb987b01a0b59193f0ca0099b28189b13a00c8 * Fixes NB#91650, fixes a potential problem with strftime pmo-trunk-r6246 --- diff --git a/src/modest-text-utils.c b/src/modest-text-utils.c index 62bd6bb..5aa8860 100644 --- a/src/modest-text-utils.c +++ b/src/modest-text-utils.c @@ -278,6 +278,11 @@ modest_text_utils_strftime(char *s, gsize max, const char *fmt, time_t timet) { struct tm tm; + /* To prevent possible problems in strftime that could leave + garbage in the s variable */ + if (s) + s[0] = '\0'; + /* does not work on old maemo glib: * g_date_set_time_t (&date, timet); */ @@ -995,7 +1000,7 @@ cmp_offsets_reverse (const url_match_t *match1, const url_match_t *match2) return match2->offset - match1->offset; } -static gboolean url_matches_block = 0; +static gint url_matches_block = 0; static url_match_pattern_t patterns[] = MAIL_VIEWER_URL_MATCH_PATTERNS;