An issue was discovered in icoutils 0.31.1. A buffer overflow was observed in the \decode_ne_resource_id\ function in the \restable.c\ source file. This is happening because the \len\ parameter for memcpy is not checked for size and thus becomes a negative integer in the process resulting in a failed memcpy. This affects wrestool.