cmdutils.c:143: error: Null Dereference
  pointer `arg` last assigned on line 128 could be null and is dereferenced by call to `parse_number_or_die()` at line 143, column 34.

cmdutils.c:103:1: start of procedure parse_options()
101. }
102. 
103. void parse_options(int argc, char **argv, const OptionDef *options,
     ^
104.                    void (* parse_arg_function)(const char*))
105. {

cmdutils.c:107:5: 
105. {
106.     const char *opt, *arg;
107.     int optindex, handleoptions=1;
         ^
108.     const OptionDef *po;
109. 

cmdutils.c:111:5: 
109. 
110.     /* parse options */
111.     optindex = 1;
         ^
112.     while (optindex < argc) {
113.         opt = argv[optindex++];

cmdutils.c:112:12: Loop condition is true. Entering loop body
110.     /* parse options */
111.     optindex = 1;
112.     while (optindex < argc) {
                ^
113.         opt = argv[optindex++];
114. 

cmdutils.c:113:9: 
111.     optindex = 1;
112.     while (optindex < argc) {
113.         opt = argv[optindex++];
             ^
114. 
115.         if (handleoptions && opt[0] == '-' && opt[1] != '\0') {

cmdutils.c:115:13: Taking true branch
113.         opt = argv[optindex++];
114. 
115.         if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
                 ^
116.           if (opt[1] == '-' && opt[2] == '\0') {
117.             handleoptions = 0;

cmdutils.c:115:30: Taking true branch
113.         opt = argv[optindex++];
114. 
115.         if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
                                  ^
116.           if (opt[1] == '-' && opt[2] == '\0') {
117.             handleoptions = 0;

cmdutils.c:115:47: Taking true branch
113.         opt = argv[optindex++];
114. 
115.         if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
                                                   ^
116.           if (opt[1] == '-' && opt[2] == '\0') {
117.             handleoptions = 0;

cmdutils.c:116:15: Taking false branch
114. 
115.         if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
116.           if (opt[1] == '-' && opt[2] == '\0') {
                   ^
117.             handleoptions = 0;
118.             continue;

cmdutils.c:120:13: Skipping find_option(): empty list of specs
118.             continue;
119.           }
120.             po= find_option(options, opt + 1);
                 ^
121.             if (!po->name)
122.                 po= find_option(options, "default");

cmdutils.c:121:18: Taking false branch
119.           }
120.             po= find_option(options, opt + 1);
121.             if (!po->name)
                      ^
122.                 po= find_option(options, "default");
123.             if (!po->name) {

cmdutils.c:123:18: Taking false branch
121.             if (!po->name)
122.                 po= find_option(options, "default");
123.             if (!po->name) {
                      ^
124. unknown_opt:
125.                 fprintf(stderr, "%s: unrecognized option '%s'\n", argv[0], opt);

cmdutils.c:128:13: 
126.                 exit(1);
127.             }
128.             arg = NULL;
                 ^
129.             if (po->flags & HAS_ARG) {
130.                 arg = argv[optindex++];

cmdutils.c:129:17: Taking false branch
127.             }
128.             arg = NULL;
129.             if (po->flags & HAS_ARG) {
                     ^
130.                 arg = argv[optindex++];
131.                 if (!arg) {

cmdutils.c:136:17: Taking false branch
134.                 }
135.             }
136.             if (po->flags & OPT_STRING) {
                     ^
137.                 char *str;
138.                 str = av_strdup(arg);

cmdutils.c:140:24: Taking false branch
138.                 str = av_strdup(arg);
139.                 *po->u.str_arg = str;
140.             } else if (po->flags & OPT_BOOL) {
                            ^
141.                 *po->u.int_arg = 1;
142.             } else if (po->flags & OPT_INT) {

cmdutils.c:142:24: Taking true branch
140.             } else if (po->flags & OPT_BOOL) {
141.                 *po->u.int_arg = 1;
142.             } else if (po->flags & OPT_INT) {
                            ^
143.                 *po->u.int_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT_MIN, INT_MAX);
144.             } else if (po->flags & OPT_INT64) {

cmdutils.c:143:17: 
141.                 *po->u.int_arg = 1;
142.             } else if (po->flags & OPT_INT) {
143.                 *po->u.int_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT_MIN, INT_MAX);
                     ^
144.             } else if (po->flags & OPT_INT64) {
145.                 *po->u.int64_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT64_MIN, INT64_MAX);

cmdutils.c:43:1: start of procedure parse_number_or_die()
  41. 
  42. 
  43. double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max)
      ^
  44. {
  45.     char *tail;

cmdutils.c:47:5: 
  45.     char *tail;
  46.     const char *error;
  47.     double d = strtod(numstr, &tail);
          ^
  48.     if (*tail)
  49.         error= "Expected number for %s but found: %s\n";

cmdutils.c:48:9: Taking false branch
  46.     const char *error;
  47.     double d = strtod(numstr, &tail);
  48.     if (*tail)
              ^
  49.         error= "Expected number for %s but found: %s\n";
  50.     else if (d < min || d > max)

cmdutils.c:50:14: Taking false branch
  48.     if (*tail)
  49.         error= "Expected number for %s but found: %s\n";
  50.     else if (d < min || d > max)
                   ^
  51.         error= "The value for %s was %s which is not within %f - %f\n";
  52.     else if(type == OPT_INT64 && (int64_t)d != d)

cmdutils.c:50:25: Taking false branch
  48.     if (*tail)
  49.         error= "Expected number for %s but found: %s\n";
  50.     else if (d < min || d > max)
                              ^
  51.         error= "The value for %s was %s which is not within %f - %f\n";
  52.     else if(type == OPT_INT64 && (int64_t)d != d)

cmdutils.c:52:13: Taking false branch
  50.     else if (d < min || d > max)
  51.         error= "The value for %s was %s which is not within %f - %f\n";
  52.     else if(type == OPT_INT64 && (int64_t)d != d)
                  ^
  53.         error= "Expected int64 for %s but found %s\n";
  54.     else

cmdutils.c:55:9: 
  53.         error= "Expected int64 for %s but found %s\n";
  54.     else
  55.         return d;
              ^
  56.     fprintf(stderr, error, context, numstr, min, max);
  57.     exit(1);

cmdutils.c:58:1: return from a call to parse_number_or_die
  56.     fprintf(stderr, error, context, numstr, min, max);
  57.     exit(1);
  58. }
      ^
  59. 
  60. int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration)
