It doesn't make any sense that `result_len` should specify the length of `result_len`. Instead, `result_len` should specify the length of the `result` parameter.