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

cmdutils.c:109:1: start of procedure parse_options()
107. }
108. 
109. void parse_options(int argc, char **argv, const OptionDef *options,
     ^
110.                    void (* parse_arg_function)(const char*))
111. {

cmdutils.c:113:5: 
111. {
112.     const char *opt, *arg;
113.     int optindex, handleoptions=1;
         ^
114.     const OptionDef *po;
115. 

cmdutils.c:117:5: 
115. 
116.     /* parse options */
117.     optindex = 1;
         ^
118.     while (optindex < argc) {
119.         opt = argv[optindex++];

cmdutils.c:118:12: Loop condition is true. Entering loop body
116.     /* parse options */
117.     optindex = 1;
118.     while (optindex < argc) {
                ^
119.         opt = argv[optindex++];
120. 

cmdutils.c:119:9: 
117.     optindex = 1;
118.     while (optindex < argc) {
119.         opt = argv[optindex++];
             ^
120. 
121.         if (handleoptions && opt[0] == '-' && opt[1] != '\0') {

cmdutils.c:121:13: Taking true branch
119.         opt = argv[optindex++];
120. 
121.         if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
                 ^
122.           if (opt[1] == '-' && opt[2] == '\0') {
123.             handleoptions = 0;

cmdutils.c:121:30: Taking true branch
119.         opt = argv[optindex++];
120. 
121.         if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
                                  ^
122.           if (opt[1] == '-' && opt[2] == '\0') {
123.             handleoptions = 0;

cmdutils.c:121:47: Taking true branch
119.         opt = argv[optindex++];
120. 
121.         if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
                                                   ^
122.           if (opt[1] == '-' && opt[2] == '\0') {
123.             handleoptions = 0;

cmdutils.c:122:15: Taking false branch
120. 
121.         if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
122.           if (opt[1] == '-' && opt[2] == '\0') {
                   ^
123.             handleoptions = 0;
124.             continue;

cmdutils.c:126:13: Skipping find_option(): empty list of specs
124.             continue;
125.           }
126.             po= find_option(options, opt + 1);
                 ^
127.             if (!po->name)
128.                 po= find_option(options, "default");

cmdutils.c:127:18: Taking true branch
125.           }
126.             po= find_option(options, opt + 1);
127.             if (!po->name)
                      ^
128.                 po= find_option(options, "default");
129.             if (!po->name) {

cmdutils.c:128:17: Skipping find_option(): empty list of specs
126.             po= find_option(options, opt + 1);
127.             if (!po->name)
128.                 po= find_option(options, "default");
                     ^
129.             if (!po->name) {
130. unknown_opt:

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

cmdutils.c:134:13: 
132.                 exit(1);
133.             }
134.             arg = NULL;
                 ^
135.             if (po->flags & HAS_ARG) {
136.                 arg = argv[optindex++];

cmdutils.c:135:17: Taking false branch
133.             }
134.             arg = NULL;
135.             if (po->flags & HAS_ARG) {
                     ^
136.                 arg = argv[optindex++];
137.                 if (!arg) {

cmdutils.c:142:17: Taking false branch
140.                 }
141.             }
142.             if (po->flags & OPT_STRING) {
                     ^
143.                 char *str;
144.                 str = av_strdup(arg);

cmdutils.c:146:24: Taking false branch
144.                 str = av_strdup(arg);
145.                 *po->u.str_arg = str;
146.             } else if (po->flags & OPT_BOOL) {
                            ^
147.                 *po->u.int_arg = 1;
148.             } else if (po->flags & OPT_INT) {

cmdutils.c:148:24: Taking false branch
146.             } else if (po->flags & OPT_BOOL) {
147.                 *po->u.int_arg = 1;
148.             } else if (po->flags & OPT_INT) {
                            ^
149.                 *po->u.int_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT_MIN, INT_MAX);
150.             } else if (po->flags & OPT_INT64) {

cmdutils.c:150:24: Taking false branch
148.             } else if (po->flags & OPT_INT) {
149.                 *po->u.int_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT_MIN, INT_MAX);
150.             } else if (po->flags & OPT_INT64) {
                            ^
151.                 *po->u.int64_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT64_MIN, INT64_MAX);
152.             } else if (po->flags & OPT_FLOAT) {

cmdutils.c:152:24: Taking true branch
150.             } else if (po->flags & OPT_INT64) {
151.                 *po->u.int64_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT64_MIN, INT64_MAX);
152.             } else if (po->flags & OPT_FLOAT) {
                            ^
153.                 *po->u.float_arg = parse_number_or_die(opt+1, arg, OPT_FLOAT, -1.0/0.0, 1.0/0.0);
154.             } else if (po->flags & OPT_FUNC2) {

cmdutils.c:153:17: 
151.                 *po->u.int64_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT64_MIN, INT64_MAX);
152.             } else if (po->flags & OPT_FLOAT) {
153.                 *po->u.float_arg = parse_number_or_die(opt+1, arg, OPT_FLOAT, -1.0/0.0, 1.0/0.0);
                     ^
154.             } else if (po->flags & OPT_FUNC2) {
155.                 if(po->u.func2_arg(opt+1, arg)<0)

cmdutils.c:49:1: start of procedure parse_number_or_die()
  47. struct SwsContext *sws_opts;
  48. 
  49. double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max)
      ^
  50. {
  51.     char *tail;

cmdutils.c:53:5: 
  51.     char *tail;
  52.     const char *error;
  53.     double d = strtod(numstr, &tail);
          ^
  54.     if (*tail)
  55.         error= "Expected number for %s but found: %s\n";

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

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

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

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

cmdutils.c:61:9: 
  59.         error= "Expected int64 for %s but found %s\n";
  60.     else
  61.         return d;
              ^
  62.     fprintf(stderr, error, context, numstr, min, max);
  63.     exit(1);

cmdutils.c:64:1: return from a call to parse_number_or_die
  62.     fprintf(stderr, error, context, numstr, min, max);
  63.     exit(1);
  64. }
      ^
  65. 
  66. int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration)
