added extra check for function arguments.
authorRodrigo Moya <rodrigo@ximian.com>
Fri, 14 May 2004 12:20:37 +0000 (12:20 +0000)
committerRodrigo Moya <rodrigo@src.gnome.org>
Fri, 14 May 2004 12:20:37 +0000 (12:20 +0000)
2004-05-14  Rodrigo Moya <rodrigo@ximian.com>

* libedata-cal/e-cal-backend-sexp.c (e_cal_backend_sexp_func_make_time):
added extra check for function arguments.

calendar/ChangeLog
calendar/libedata-cal/e-cal-backend-sexp.c

index 4c853a4..61bfbf9 100644 (file)
@@ -1,5 +1,8 @@
 2004-05-14  Rodrigo Moya <rodrigo@ximian.com>
 
+       * libedata-cal/e-cal-backend-sexp.c (e_cal_backend_sexp_func_make_time):
+       added extra check for function arguments.
+
        * libedata-cal/e-cal-backend-cache.c (e_cal_backend_cache_put_timezone):
        added missing implementation from recurreces-work-branch.
 
index 3dbf49e..4f04612 100644 (file)
@@ -84,6 +84,12 @@ e_cal_backend_sexp_func_make_time (ESExp *esexp, int argc, ESExpResult **argv, v
                return NULL;
        }
        str = argv[0]->value.string;
+       if (!str || !*str) {
+               e_sexp_fatal_error (esexp, _("\"%s\" expects the first "
+                                            "argument to be a string"),
+                                   "make-time");
+               return NULL;
+       }
 
        t = time_from_isodate (str);
        if (t == -1) {