Closed gbletr42 closed 7 months ago
we could also solve this by adding in a check for the m=1 case that we actually have 1 recovery, as the reed solomon code handles having zero recoveries fine. It's your choice, but memcpy is probably faster.
Looks like a good improvement
I ran into an edge case in my application bef where if there is no corrupted original data, but all the recoveries are corrupted, we head into a null dereference. So to handle the case where we have no lost data, we should just copy that data into the work array and return Leopard_Success. This allows me to naively call the decode library without having to check if the original array is fine or not, and I feel is an undocumented footgun anyways.