On 16.09.2020 10:37, Trammell Hudson wrote:
> On Wednesday, September 16, 2020 3:32 AM, Roger Pau Monné
> <[email protected]> wrote:
>> On Mon, Sep 14, 2020 at 07:50:12AM -0400, Trammell Hudson wrote:
>>> - s2w(&name_string);
>>
>> Don't you need to check that s2w succeed, so that name_string.w is not
>> a random pointer from stack garbage?
>
> Maybe? I don't see anywhere else in the code that s2w() is
> ever checked for a NULL return. Perhaps a better fix would
> be to modify the function to panic if it is unable
> to allocate.
In current code the result of s2w() gets exclusively passed to
read_file(), where first thing we have
if ( !name )
PrintErrMesg(L"No filename", EFI_OUT_OF_RESOURCES);
Jan