avtools/avconv_hw.c:247: error: Null Dereference
  pointer `type_name` last assigned on line 246 could be null and is dereferenced by call to `strstr()` at line 247, column 13.

avtools/avconv_hw.c:239:1: start of procedure hw_device_match_type_in_name()
237. }
238. 
239. static enum AVHWDeviceType hw_device_match_type_in_name(const char *codec_name)
     ^
240. {
241.     const char *type_name;

avtools/avconv_hw.c:243:10: Skipping av_hwdevice_iterate_types(): empty list of specs
241.     const char *type_name;
242.     enum AVHWDeviceType type;
243.     for (type = av_hwdevice_iterate_types(AV_HWDEVICE_TYPE_NONE);
              ^
244.          type != AV_HWDEVICE_TYPE_NONE;
245.          type = av_hwdevice_iterate_types(type)) {

avtools/avconv_hw.c:244:10: Loop condition is true. Entering loop body
242.     enum AVHWDeviceType type;
243.     for (type = av_hwdevice_iterate_types(AV_HWDEVICE_TYPE_NONE);
244.          type != AV_HWDEVICE_TYPE_NONE;
              ^
245.          type = av_hwdevice_iterate_types(type)) {
246.         type_name = av_hwdevice_get_type_name(type);

avtools/avconv_hw.c:246:9: 
244.          type != AV_HWDEVICE_TYPE_NONE;
245.          type = av_hwdevice_iterate_types(type)) {
246.         type_name = av_hwdevice_get_type_name(type);
             ^
247.         if (strstr(codec_name, type_name))
248.             return type;

libavutil/hwcontext.c:72:1: start of procedure av_hwdevice_get_type_name()
  70. }
  71. 
  72. const char *av_hwdevice_get_type_name(enum AVHWDeviceType type)
      ^
  73. {
  74.     if (type > AV_HWDEVICE_TYPE_NONE &&

libavutil/hwcontext.c:74:9: Taking true branch
  72. const char *av_hwdevice_get_type_name(enum AVHWDeviceType type)
  73. {
  74.     if (type > AV_HWDEVICE_TYPE_NONE &&
              ^
  75.         type < FF_ARRAY_ELEMS(hw_type_names))
  76.         return hw_type_names[type];

libavutil/hwcontext.c:75:9: Taking false branch
  73. {
  74.     if (type > AV_HWDEVICE_TYPE_NONE &&
  75.         type < FF_ARRAY_ELEMS(hw_type_names))
              ^
  76.         return hw_type_names[type];
  77.     else

libavutil/hwcontext.c:78:9: 
  76.         return hw_type_names[type];
  77.     else
  78.         return NULL;
              ^
  79. }
  80. 

libavutil/hwcontext.c:79:1: return from a call to av_hwdevice_get_type_name
  77.     else
  78.         return NULL;
  79. }
      ^
  80. 
  81. enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev)

avtools/avconv_hw.c:247:13: 
245.          type = av_hwdevice_iterate_types(type)) {
246.         type_name = av_hwdevice_get_type_name(type);
247.         if (strstr(codec_name, type_name))
                 ^
248.             return type;
249.     }

static enum AVHWDeviceType hw_device_match_type_in_name(const char *codec_name)
{
    const char *type_name;
    enum AVHWDeviceType type;
    for (type = av_hwdevice_iterate_types(AV_HWDEVICE_TYPE_NONE);
         type != AV_HWDEVICE_TYPE_NONE;
         type = av_hwdevice_iterate_types(type)) {
        type_name = av_hwdevice_get_type_name(type);
        if (strstr(codec_name, type_name))
            return type;
    }
    return AV_HWDEVICE_TYPE_NONE;
}
['static enum AVHWDeviceType hw_device_match_type_in_name(const char *codec_name)\n{\n    const char *type_name;\n    enum AVHWDeviceType type;\n    for (type = av_hwdevice_iterate_types(AV_HWDEVICE_TYPE_NONE);\n         type != AV_HWDEVICE_TYPE_NONE;\n         type = av_hwdevice_iterate_types(type)) {\n        type_name = av_hwdevice_get_type_name(type);\n        if (strstr(codec_name, type_name))\n            return type;\n    }\n    return AV_HWDEVICE_TYPE_NONE;\n}', 'const char *av_hwdevice_get_type_name(enum AVHWDeviceType type)\n{\n    if (type > AV_HWDEVICE_TYPE_NONE &&\n        type < FF_ARRAY_ELEMS(hw_type_names))\n        return hw_type_names[type];\n    else\n        return NULL;\n}']