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

libavformat/movenc.c:972:1: start of procedure mov_write_hdlr_tag()
970. }
971. 
972. static int mov_write_hdlr_tag(ByteIOContext *pb, MOVTrack *track)
     ^
973. {
974.     const char *hdlr, *descr = NULL, *hdlr_type = NULL;

libavformat/movenc.c:974:5: 
972. static int mov_write_hdlr_tag(ByteIOContext *pb, MOVTrack *track)
973. {
974.     const char *hdlr, *descr = NULL, *hdlr_type = NULL;
         ^
975.     int64_t pos = url_ftell(pb);
976. 

libavformat/movenc.c:975:5: 
973. {
974.     const char *hdlr, *descr = NULL, *hdlr_type = NULL;
975.     int64_t pos = url_ftell(pb);
         ^
976. 
977.     if (!track) { /* no media --> data handler */

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

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

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

libavformat/movenc.c:977:10: Taking false branch
975.     int64_t pos = url_ftell(pb);
976. 
977.     if (!track) { /* no media --> data handler */
              ^
978.         hdlr = "dhlr";
979.         hdlr_type = "url ";

libavformat/movenc.c:982:17: Condition is false
980.         descr = "DataHandler";
981.     } else {
982.         hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
                     ^
983.         if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
984.             hdlr_type = "vide";

libavformat/movenc.c:982:16: 
980.         descr = "DataHandler";
981.     } else {
982.         hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
                    ^
983.         if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
984.             hdlr_type = "vide";

libavformat/movenc.c:982:9: 
980.         descr = "DataHandler";
981.     } else {
982.         hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
             ^
983.         if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
984.             hdlr_type = "vide";

libavformat/movenc.c:983:13: Taking false branch
981.     } else {
982.         hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
983.         if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
                 ^
984.             hdlr_type = "vide";
985.             descr = "VideoHandler";

libavformat/movenc.c:986:20: Taking false branch
984.             hdlr_type = "vide";
985.             descr = "VideoHandler";
986.         } else if (track->enc->codec_type == CODEC_TYPE_AUDIO) {
                        ^
987.             hdlr_type = "soun";
988.             descr = "SoundHandler";

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

libavformat/movenc.c:996:5: Skipping put_be32(): empty list of specs
994.     }
995. 
996.     put_be32(pb, 0); /* size */
         ^
997.     put_tag(pb, "hdlr");
998.     put_be32(pb, 0); /* Version & flags */

libavformat/movenc.c:997:5: Skipping put_tag(): empty list of specs
995. 
996.     put_be32(pb, 0); /* size */
997.     put_tag(pb, "hdlr");
         ^
998.     put_be32(pb, 0); /* Version & flags */
999.     put_buffer(pb, hdlr, 4); /* handler */

libavformat/movenc.c:998:5: Skipping put_be32(): empty list of specs
 996.     put_be32(pb, 0); /* size */
 997.     put_tag(pb, "hdlr");
 998.     put_be32(pb, 0); /* Version & flags */
          ^
 999.     put_buffer(pb, hdlr, 4); /* handler */
1000.     put_tag(pb, hdlr_type); /* handler type */

libavformat/movenc.c:999:5: Skipping put_buffer(): empty list of specs
 997.     put_tag(pb, "hdlr");
 998.     put_be32(pb, 0); /* Version & flags */
 999.     put_buffer(pb, hdlr, 4); /* handler */
          ^
1000.     put_tag(pb, hdlr_type); /* handler type */
1001.     put_be32(pb ,0); /* reserved */

libavformat/movenc.c:1000:5: Skipping put_tag(): empty list of specs
 998.     put_be32(pb, 0); /* Version & flags */
 999.     put_buffer(pb, hdlr, 4); /* handler */
1000.     put_tag(pb, hdlr_type); /* handler type */
          ^
1001.     put_be32(pb ,0); /* reserved */
1002.     put_be32(pb ,0); /* reserved */

libavformat/movenc.c:1001:5: Skipping put_be32(): empty list of specs
 999.     put_buffer(pb, hdlr, 4); /* handler */
1000.     put_tag(pb, hdlr_type); /* handler type */
1001.     put_be32(pb ,0); /* reserved */
          ^
1002.     put_be32(pb ,0); /* reserved */
1003.     put_be32(pb ,0); /* reserved */

libavformat/movenc.c:1002:5: Skipping put_be32(): empty list of specs
1000.     put_tag(pb, hdlr_type); /* handler type */
1001.     put_be32(pb ,0); /* reserved */
1002.     put_be32(pb ,0); /* reserved */
          ^
1003.     put_be32(pb ,0); /* reserved */
1004.     put_byte(pb, strlen(descr)); /* string counter */

libavformat/movenc.c:1003:5: Skipping put_be32(): empty list of specs
1001.     put_be32(pb ,0); /* reserved */
1002.     put_be32(pb ,0); /* reserved */
1003.     put_be32(pb ,0); /* reserved */
          ^
1004.     put_byte(pb, strlen(descr)); /* string counter */
1005.     put_buffer(pb, descr, strlen(descr)); /* handler description */

libavformat/movenc.c:1004:5: 
1002.     put_be32(pb ,0); /* reserved */
1003.     put_be32(pb ,0); /* reserved */
1004.     put_byte(pb, strlen(descr)); /* string counter */
          ^
1005.     put_buffer(pb, descr, strlen(descr)); /* handler description */
1006.     return updateSize(pb, pos);

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);
    put_byte(pb, strlen(descr));
    put_buffer(pb, descr, strlen(descr));
    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    put_byte(pb, strlen(descr));\n    put_buffer(pb, descr, strlen(descr));\n    return updateSize(pb, pos);\n}', 'int64_t url_ftell(ByteIOContext *s)\n{\n    return url_fseek(s, 0, SEEK_CUR);\n}']