aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-05 15:52:28 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-03-05 15:52:28 -0600
commit82434d1e1ddd26453c888d336df170e6a76da2d6 (patch)
treeab5efb6c6ec063cdabdca235e6184b5e3fd1b0a2
parentcf0bf58d243dcecd3cbb16d2681f3d5172e49ab4 (diff)
parentdaa799fac5b81b221247c581bdeadcebffcab8f3 (diff)
downloadayatana-indicator-datetime-82434d1e1ddd26453c888d336df170e6a76da2d6.tar.gz
ayatana-indicator-datetime-82434d1e1ddd26453c888d336df170e6a76da2d6.tar.bz2
ayatana-indicator-datetime-82434d1e1ddd26453c888d336df170e6a76da2d6.zip
merge lp:~charlesk/indicator-datetime/fix-943747 to silence the Coverity warning reported in bug #943747
-rw-r--r--src/datetime-prefs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/datetime-prefs.c b/src/datetime-prefs.c
index 50445ff..bfe75c0 100644
--- a/src/datetime-prefs.c
+++ b/src/datetime-prefs.c
@@ -405,6 +405,7 @@ input_time_text (GtkWidget * spinner, gdouble * value, IndicatorDatetimePanel *
if (is_locale_12h ()) { // TODO: make this look-at/watch gsettings?
char ampm[51];
+ /* coverity[secure_coding] */
scanned = sscanf (text, "%u:%u:%u %50s", &hour_in, &minute_in, &second_in, ampm);
passed = (scanned == 4);
@@ -415,6 +416,7 @@ input_time_text (GtkWidget * spinner, gdouble * value, IndicatorDatetimePanel *
}
}
} else {
+ /* coverity[secure_coding] */
scanned = sscanf (text, "%u:%u:%u", &hour_in, &minute_in, &second_in);
passed = (scanned == 3);
}
@@ -433,6 +435,7 @@ input_time_text (GtkWidget * spinner, gdouble * value, IndicatorDatetimePanel *
else {
gint year_in, month_in, day_in;
+ /* coverity[secure_coding] */
scanned = sscanf (text, "%u-%u-%u", &year_in, &month_in, &day_in);
if (scanned != 3 || year_in < 1 || year_in > 9999 ||