On 4/9/19 7:33 AM, Gao, Zhichao wrote: > The patch code looks good to me. > But while I apply this patch, it will shows "error: corrupt patch at line 24" and " error: could not build fake ancestor". Maybe you direct change the patch file and remove some blank lines. > For Uefi BdsDxe driver, the variable "PlatfomLang" would be initialize all the time. But maybe other manufacturers may have their own Bds solution and do not set this variable. This patch makes the Shell app more compatible. > > Without the patch warning. > Reviewed-by: Zhichao Gao Hello Zhichao, I am not able to reproduce the problem. I resend you the patch as attachment. When applying I had to use --keep-cr: git am --keep-cr \ ../patch/0001-ShellPkg-CommandLib-avoid-NULL-derefence-and-memory-.patch I have found no way neither on Windows nor on Linux to create a patch that applies without --keep-cr. If you still have a problem, please, send me your global and local gitconfig files, your .gitattributes and indicate on which operating system you are working with which git version. Best regards Heinrich