avconv.c:3228: error: Null Dereference
  pointer `p` last assigned on line 3228 could be null and is dereferenced at line 3228, column 5.

avconv.c:3214:1: start of procedure opt_streamid()
3212. 
3213. /* arg format is "output-stream-index:streamid-value". */
3214. static int opt_streamid(OptionsContext *o, const char *opt, const char *arg)
      ^
3215. {
3216.     int idx;

avconv.c:3220:5: 
3218.     char idx_str[16];
3219. 
3220.     av_strlcpy(idx_str, arg, sizeof(idx_str));
          ^
3221.     p = strchr(idx_str, ':');
3222.     if (!p) {

libavutil/avstring.c:64:1: start of procedure av_strlcpy()
  62. }
  63. 
  64. size_t av_strlcpy(char *dst, const char *src, size_t size)
      ^
  65. {
  66.     size_t len = 0;

libavutil/avstring.c:66:5: 
  64. size_t av_strlcpy(char *dst, const char *src, size_t size)
  65. {
  66.     size_t len = 0;
          ^
  67.     while (++len < size && *src)
  68.         *dst++ = *src++;

libavutil/avstring.c:67:12: Loop condition is true. Entering loop body
  65. {
  66.     size_t len = 0;
  67.     while (++len < size && *src)
                 ^
  68.         *dst++ = *src++;
  69.     if (len <= size)

libavutil/avstring.c:67:28: Loop condition is false. Leaving loop
  65. {
  66.     size_t len = 0;
  67.     while (++len < size && *src)
                                 ^
  68.         *dst++ = *src++;
  69.     if (len <= size)

libavutil/avstring.c:69:9: Taking true branch
  67.     while (++len < size && *src)
  68.         *dst++ = *src++;
  69.     if (len <= size)
              ^
  70.         *dst = 0;
  71.     return len + strlen(src) - 1;

libavutil/avstring.c:70:9: 
  68.         *dst++ = *src++;
  69.     if (len <= size)
  70.         *dst = 0;
              ^
  71.     return len + strlen(src) - 1;
  72. }

libavutil/avstring.c:71:5: 
  69.     if (len <= size)
  70.         *dst = 0;
  71.     return len + strlen(src) - 1;
          ^
  72. }
  73. 

libavutil/avstring.c:72:1: return from a call to av_strlcpy
  70.         *dst = 0;
  71.     return len + strlen(src) - 1;
  72. }
      ^
  73. 
  74. size_t av_strlcat(char *dst, const char *src, size_t size)

avconv.c:3221:5: 
3219. 
3220.     av_strlcpy(idx_str, arg, sizeof(idx_str));
3221.     p = strchr(idx_str, ':');
          ^
3222.     if (!p) {
3223.         fprintf(stderr,

avconv.c:3222:10: Taking true branch
3220.     av_strlcpy(idx_str, arg, sizeof(idx_str));
3221.     p = strchr(idx_str, ':');
3222.     if (!p) {
               ^
3223.         fprintf(stderr,
3224.                 "Invalid value '%s' for option '%s', required syntax is 'index:value'\n",

avconv.c:3223:9: 
3221.     p = strchr(idx_str, ':');
3222.     if (!p) {
3223.         fprintf(stderr,
              ^
3224.                 "Invalid value '%s' for option '%s', required syntax is 'index:value'\n",
3225.                 arg, opt);

avconv.c:3226:9: Skipping exit_program(): empty list of specs
3224.                 "Invalid value '%s' for option '%s', required syntax is 'index:value'\n",
3225.                 arg, opt);
3226.         exit_program(1);
              ^
3227.     }
3228.     *p++ = '\0';

avconv.c:3228:5: 
3226.         exit_program(1);
3227.     }
3228.     *p++ = '\0';
          ^
3229.     idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, INT_MAX);
3230.     o->streamid_map = grow_array(o->streamid_map, sizeof(*o->streamid_map), &o->nb_streamid_map, idx+1);

static int opt_streamid(OptionsContext *o, const char *opt, const char *arg)
{
    int idx;
    char *p;
    char idx_str[16];
    av_strlcpy(idx_str, arg, sizeof(idx_str));
    p = strchr(idx_str, ':');
    if (!p) {
        fprintf(stderr,
                "Invalid value '%s' for option '%s', required syntax is 'index:value'\n",
                arg, opt);
        exit_program(1);
    }
    *p++ = '\0';
    idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, INT_MAX);
    o->streamid_map = grow_array(o->streamid_map, sizeof(*o->streamid_map), &o->nb_streamid_map, idx+1);
    o->streamid_map[idx] = parse_number_or_die(opt, p, OPT_INT, 0, INT_MAX);
    return 0;
}
['static int opt_streamid(OptionsContext *o, const char *opt, const char *arg)\n{\n    int idx;\n    char *p;\n    char idx_str[16];\n    av_strlcpy(idx_str, arg, sizeof(idx_str));\n    p = strchr(idx_str, \':\');\n    if (!p) {\n        fprintf(stderr,\n                "Invalid value \'%s\' for option \'%s\', required syntax is \'index:value\'\\n",\n                arg, opt);\n        exit_program(1);\n    }\n    *p++ = \'\\0\';\n    idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, INT_MAX);\n    o->streamid_map = grow_array(o->streamid_map, sizeof(*o->streamid_map), &o->nb_streamid_map, idx+1);\n    o->streamid_map[idx] = parse_number_or_die(opt, p, OPT_INT, 0, INT_MAX);\n    return 0;\n}', 'size_t av_strlcpy(char *dst, const char *src, size_t size)\n{\n    size_t len = 0;\n    while (++len < size && *src)\n        *dst++ = *src++;\n    if (len <= size)\n        *dst = 0;\n    return len + strlen(src) - 1;\n}']