Protect native_avail from sending NULL to strcpy which results in a segfault. A mask for an event may not apply to the CPU and therefore strchr(name,':') may return NULL and be the second argument to strcpy. This happened for the AMD K8 event PROBE and its umask UPSTREAM_WRITES which only applies to AMD Rev D and later.
Protect native_avail from sending NULL to strcpy which results in a segfault.
A mask for an event may not apply to the CPU and therefore strchr(name,':')
may return NULL and be the second argument to strcpy. This happened for the
AMD K8 event PROBE and its umask UPSTREAM_WRITES which only applies to AMD
Rev D and later.

pyrovski/papi,arm-hpc/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi