The wrapped function -- as the name suggests -- is supposed to open the
file, but also returns its path. The tests used to only return the path
conditionally, but the tested function checks the path length, which
might fail if the path is left uninitialized. The solution is to write
the path to the buffer unconditionally.
Change-Id: Iffe4e323c258834fe7f63f2d719ce3c12fd7c60a
if (open_buf_path)
strncpy(actual_path, open_buf_path, path_size);
+ else
+ actual_path[0] = '\0';
if (open_buf_ret > 0)
*fd = 0xFD;
return open_buf_ret;