avconv.c:4042: error: Null Dereference
  pointer `today` last assigned on line 4040 could be null and is dereferenced at line 4042, column 69.

avconv.c:4036:1: start of procedure opt_vstats()
4034. }
4035. 
4036. static int opt_vstats(const char *opt, const char *arg)
      ^
4037. {
4038.     char filename[40];

avconv.c:4039:5: 
4037. {
4038.     char filename[40];
4039.     time_t today2 = time(NULL);
          ^
4040.     struct tm *today = localtime(&today2);
4041. 

avconv.c:4040:5: 
4038.     char filename[40];
4039.     time_t today2 = time(NULL);
4040.     struct tm *today = localtime(&today2);
          ^
4041. 
4042.     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,

avconv.c:4042:5: 
4040.     struct tm *today = localtime(&today2);
4041. 
4042.     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
          ^
4043.              today->tm_sec);
4044.     return opt_vstats_file(opt, filename);
