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

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

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

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

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

libavutil/hwcontext.c:68:1: start of procedure av_hwdevice_get_type_name()
  66. }
  67. 
  68. const char *av_hwdevice_get_type_name(enum AVHWDeviceType type)
      ^
  69. {
  70.     if (type > AV_HWDEVICE_TYPE_NONE &&

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

libavutil/hwcontext.c:71:9: Taking false branch
  69. {
  70.     if (type > AV_HWDEVICE_TYPE_NONE &&
  71.         type < FF_ARRAY_ELEMS(hw_type_names))
              ^
  72.         return hw_type_names[type];
  73.     else

libavutil/hwcontext.c:74:9: 
  72.         return hw_type_names[type];
  73.     else
  74.         return NULL;
              ^
  75. }
  76. 

libavutil/hwcontext.c:75:1: return from a call to av_hwdevice_get_type_name
  73.     else
  74.         return NULL;
  75. }
      ^
  76. 
  77. enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev)

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

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}']