]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/btime.c
ebl add sql_escape to catalog messages
[bacula/bacula] / bacula / src / lib / btime.c
index 7011b74a9dda4f83560f9f95c1b3952c75be1a68..0c9facb30d25041581e723365a501dcc7f490b0b 100644 (file)
@@ -105,6 +105,11 @@ utime_t str_to_utime(char *str)
    struct tm tm;
    time_t ttime;
 
+   /* Check for bad argument */
+   if (!str || *str == 0) {
+      return 0;
+   }
+
    if (sscanf(str, "%d-%d-%d %d:%d:%d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday,
                                         &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) {
       return 0;