It was returning a pointer to stack-allocated memory, so make the
allocation at the caller instead.
Found by: clang static analyzer
Yeah, I of course had size_t first, but realistically a char would suffice. I wanted to keep it as a 32bit int for the minor savings for LP64 platforms.
asmc_key_read(device_t dev, const char *key, uint8_t *buf, uint8_t len)
so maybe use uint8_t as well?