Hi,
Don't know if it is related but I see line 779 in 
ShellPkg\Library\UefiFileHandleLib\UefiFileHandleLib.c
---------
  CopySize = StrSize(*Destination);
  CopyMem((*Destination)+((Count-2)/sizeof(CHAR16)), *Destination, CopySize);
---------
so copy destination is out of array bound.
CopySize must be calculated before ReallocatePool as it is old size.

Sergey

21.06.2013, в 2:14, Cohen, Eugene написал(а):

> Dear ShellPkg maintainer,
>  
> We are seeing an ASSERT with recursive deletion with the ‘rm’ shell command.  
> The issue seems to manifest when we try to delete a non-empty directory (and 
> hence the contents within it) when the command is executed from another drive 
> (or no current working directory at all).
>  
> Here are the cases that fail and succeed:
>  
>  
> ASSERTS:
> Shell> rm –q fs0:\folder    (where ‘folder’ is a directory containing at 
> least one file)
> ASSERT 
> d:\git\bios\edk2\ShellPkg\Library\UefiFileHandleLib\UefiFileHandleLib.c(281): 
> FileHandle != ((void *) 0)
>  
> Shell> fs1:
> FS1:\> rm –q fs0:\folder    (where ‘folder’ is a directory containing at 
> least one file)
> ASSERT 
> d:\git\bios\edk2\ShellPkg\Library\UefiFileHandleLib\UefiFileHandleLib.c(281): 
> FileHandle != ((void *) 0)
>  
>  
> SUCCEEDS:
> Shell> rm –q fs0:\folder\foo.txt
> Shell> rm –q fs0:\folder   (where ‘folder’ is an empty directory)
>  
> Shell> fs1:
> FS1:\> rm –q folder   (where ‘folder’ is an empty directory OR a directory 
> containing at least one file)
>  
> FS1:\> rm –q folder\folder2   (where ‘folder2’ is an empty directory OR a 
> directory containing at least one file)
>  
>  
> We have tried to debug the issue but so far have not yet comprehended the 
> shell internals enough to make sense of the failure.
>  
> Thanks,
>  
> Eugene
>  
>  
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
> 
> Build for Windows Store.
> 
> http://p.sf.net/sfu/windows-dev2dev_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to