libavformat/movenc.c:1075: error: Null Dereference
  pointer `descr` last assigned on line 1044 could be null and is dereferenced by call to `strlen()` at line 1075, column 22.

libavformat/movenc.c:1042:1: start of procedure mov_write_hdlr_tag()
1040. }
1041. 
1042. static int mov_write_hdlr_tag(ByteIOContext *pb, MOVTrack *track)
      ^
1043. {
1044.     const char *hdlr, *descr = NULL, *hdlr_type = NULL;

libavformat/movenc.c:1044:5: 
1042. static int mov_write_hdlr_tag(ByteIOContext *pb, MOVTrack *track)
1043. {
1044.     const char *hdlr, *descr = NULL, *hdlr_type = NULL;
          ^
1045.     int64_t pos = url_ftell(pb);
1046. 

libavformat/movenc.c:1045:5: 
1043. {
1044.     const char *hdlr, *descr = NULL, *hdlr_type = NULL;
1045.     int64_t pos = url_ftell(pb);
          ^
1046. 
1047.     if (!track) { /* no media --> data handler */

libavformat/aviobuf.c:185:1: start of procedure url_ftell()
  183. }
  184. 
  185. int64_t url_ftell(ByteIOContext *s)
       ^
  186. {
  187.     return url_fseek(s, 0, SEEK_CUR);

libavformat/aviobuf.c:187:5: Skipping url_fseek(): empty list of specs
  185. int64_t url_ftell(ByteIOContext *s)
  186. {
  187.     return url_fseek(s, 0, SEEK_CUR);
           ^
  188. }
  189. 

libavformat/aviobuf.c:188:1: return from a call to url_ftell
  186. {
  187.     return url_fseek(s, 0, SEEK_CUR);
  188. }
       ^
  189. 
  190. int64_t url_fsize(ByteIOContext *s)

libavformat/movenc.c:1047:10: Taking false branch
1045.     int64_t pos = url_ftell(pb);
1046. 
1047.     if (!track) { /* no media --> data handler */
               ^
1048.         hdlr = "dhlr";
1049.         hdlr_type = "url ";

libavformat/movenc.c:1052:17: Condition is true
1050.         descr = "DataHandler";
1051.     } else {
1052.         hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
                      ^
1053.         if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
1054.             hdlr_type = "vide";

libavformat/movenc.c:1052:16: 
1050.         descr = "DataHandler";
1051.     } else {
1052.         hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
                     ^
1053.         if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
1054.             hdlr_type = "vide";

libavformat/movenc.c:1052:9: 
1050.         descr = "DataHandler";
1051.     } else {
1052.         hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
              ^
1053.         if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
1054.             hdlr_type = "vide";

libavformat/movenc.c:1053:13: Taking false branch
1051.     } else {
1052.         hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
1053.         if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
                  ^
1054.             hdlr_type = "vide";
1055.             descr = "VideoHandler";

libavformat/movenc.c:1056:20: Taking false branch
1054.             hdlr_type = "vide";
1055.             descr = "VideoHandler";
1056.         } else if (track->enc->codec_type == CODEC_TYPE_AUDIO) {
                         ^
1057.             hdlr_type = "soun";
1058.             descr = "SoundHandler";

libavformat/movenc.c:1059:20: Taking false branch
1057.             hdlr_type = "soun";
1058.             descr = "SoundHandler";
1059.         } else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) {
                         ^
1060.             if (track->tag == MKTAG('t','x','3','g')) hdlr_type = "sbtl";
1061.             else                                      hdlr_type = "text";

libavformat/movenc.c:1066:5: Skipping put_be32(): empty list of specs
1064.     }
1065. 
1066.     put_be32(pb, 0); /* size */
          ^
1067.     put_tag(pb, "hdlr");
1068.     put_be32(pb, 0); /* Version & flags */

libavformat/movenc.c:1067:5: Skipping put_tag(): empty list of specs
1065. 
1066.     put_be32(pb, 0); /* size */
1067.     put_tag(pb, "hdlr");
          ^
1068.     put_be32(pb, 0); /* Version & flags */
1069.     put_buffer(pb, hdlr, 4); /* handler */

libavformat/movenc.c:1068:5: Skipping put_be32(): empty list of specs
1066.     put_be32(pb, 0); /* size */
1067.     put_tag(pb, "hdlr");
1068.     put_be32(pb, 0); /* Version & flags */
          ^
1069.     put_buffer(pb, hdlr, 4); /* handler */
1070.     put_tag(pb, hdlr_type); /* handler type */

libavformat/movenc.c:1069:5: Skipping put_buffer(): empty list of specs
1067.     put_tag(pb, "hdlr");
1068.     put_be32(pb, 0); /* Version & flags */
1069.     put_buffer(pb, hdlr, 4); /* handler */
          ^
1070.     put_tag(pb, hdlr_type); /* handler type */
1071.     put_be32(pb ,0); /* reserved */

libavformat/movenc.c:1070:5: Skipping put_tag(): empty list of specs
1068.     put_be32(pb, 0); /* Version & flags */
1069.     put_buffer(pb, hdlr, 4); /* handler */
1070.     put_tag(pb, hdlr_type); /* handler type */
          ^
1071.     put_be32(pb ,0); /* reserved */
1072.     put_be32(pb ,0); /* reserved */

libavformat/movenc.c:1071:5: Skipping put_be32(): empty list of specs
1069.     put_buffer(pb, hdlr, 4); /* handler */
1070.     put_tag(pb, hdlr_type); /* handler type */
1071.     put_be32(pb ,0); /* reserved */
          ^
1072.     put_be32(pb ,0); /* reserved */
1073.     put_be32(pb ,0); /* reserved */

libavformat/movenc.c:1072:5: Skipping put_be32(): empty list of specs
1070.     put_tag(pb, hdlr_type); /* handler type */
1071.     put_be32(pb ,0); /* reserved */
1072.     put_be32(pb ,0); /* reserved */
          ^
1073.     put_be32(pb ,0); /* reserved */
1074.     if (!track || track->mode == MODE_MOV)

libavformat/movenc.c:1073:5: Skipping put_be32(): empty list of specs
1071.     put_be32(pb ,0); /* reserved */
1072.     put_be32(pb ,0); /* reserved */
1073.     put_be32(pb ,0); /* reserved */
          ^
1074.     if (!track || track->mode == MODE_MOV)
1075.         put_byte(pb, strlen(descr)); /* pascal string */

libavformat/movenc.c:1074:10: Taking false branch
1072.     put_be32(pb ,0); /* reserved */
1073.     put_be32(pb ,0); /* reserved */
1074.     if (!track || track->mode == MODE_MOV)
               ^
1075.         put_byte(pb, strlen(descr)); /* pascal string */
1076.     put_buffer(pb, descr, strlen(descr)); /* handler description */

libavformat/movenc.c:1074:19: Taking true branch
1072.     put_be32(pb ,0); /* reserved */
1073.     put_be32(pb ,0); /* reserved */
1074.     if (!track || track->mode == MODE_MOV)
                        ^
1075.         put_byte(pb, strlen(descr)); /* pascal string */
1076.     put_buffer(pb, descr, strlen(descr)); /* handler description */

libavformat/movenc.c:1075:9: 
1073.     put_be32(pb ,0); /* reserved */
1074.     if (!track || track->mode == MODE_MOV)
1075.         put_byte(pb, strlen(descr)); /* pascal string */
              ^
1076.     put_buffer(pb, descr, strlen(descr)); /* handler description */
1077.     if (track && track->mode != MODE_MOV)

static int mov_write_hdlr_tag(ByteIOContext *pb, MOVTrack *track)
{
    const char *hdlr, *descr = NULL, *hdlr_type = NULL;
    int64_t pos = url_ftell(pb);
    if (!track) {
        hdlr = "dhlr";
        hdlr_type = "url ";
        descr = "DataHandler";
    } else {
        hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
        if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
            hdlr_type = "vide";
            descr = "VideoHandler";
        } else if (track->enc->codec_type == CODEC_TYPE_AUDIO) {
            hdlr_type = "soun";
            descr = "SoundHandler";
        } else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) {
            if (track->tag == MKTAG('t','x','3','g')) hdlr_type = "sbtl";
            else                                      hdlr_type = "text";
            descr = "SubtitleHandler";
        }
    }
    put_be32(pb, 0);
    put_tag(pb, "hdlr");
    put_be32(pb, 0);
    put_buffer(pb, hdlr, 4);
    put_tag(pb, hdlr_type);
    put_be32(pb ,0);
    put_be32(pb ,0);
    put_be32(pb ,0);
    if (!track || track->mode == MODE_MOV)
        put_byte(pb, strlen(descr));
    put_buffer(pb, descr, strlen(descr));
    if (track && track->mode != MODE_MOV)
        put_byte(pb, 0);
    return updateSize(pb, pos);
}
['static int mov_write_hdlr_tag(ByteIOContext *pb, MOVTrack *track)\n{\n    const char *hdlr, *descr = NULL, *hdlr_type = NULL;\n    int64_t pos = url_ftell(pb);\n    if (!track) {\n        hdlr = "dhlr";\n        hdlr_type = "url ";\n        descr = "DataHandler";\n    } else {\n        hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\\0\\0\\0\\0";\n        if (track->enc->codec_type == CODEC_TYPE_VIDEO) {\n            hdlr_type = "vide";\n            descr = "VideoHandler";\n        } else if (track->enc->codec_type == CODEC_TYPE_AUDIO) {\n            hdlr_type = "soun";\n            descr = "SoundHandler";\n        } else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) {\n            if (track->tag == MKTAG(\'t\',\'x\',\'3\',\'g\')) hdlr_type = "sbtl";\n            else                                      hdlr_type = "text";\n            descr = "SubtitleHandler";\n        }\n    }\n    put_be32(pb, 0);\n    put_tag(pb, "hdlr");\n    put_be32(pb, 0);\n    put_buffer(pb, hdlr, 4);\n    put_tag(pb, hdlr_type);\n    put_be32(pb ,0);\n    put_be32(pb ,0);\n    put_be32(pb ,0);\n    if (!track || track->mode == MODE_MOV)\n        put_byte(pb, strlen(descr));\n    put_buffer(pb, descr, strlen(descr));\n    if (track && track->mode != MODE_MOV)\n        put_byte(pb, 0);\n    return updateSize(pb, pos);\n}', 'int64_t url_ftell(ByteIOContext *s)\n{\n    return url_fseek(s, 0, SEEK_CUR);\n}']