svn commit: r314891 - head/sys/boot/efi/loader

Dexuan Cui dexuan at FreeBSD.org
Wed Mar 8 02:50:30 UTC 2017


Author: dexuan
Date: Wed Mar  8 02:50:29 2017
New Revision: 314891
URL: https://svnweb.freebsd.org/changeset/base/314891

Log:
  loader.efi: finally fix the off-by-one bug in efi_verify_staging_size()
  
  r314828(loader.efi: fix an off-by-one bug in efi_verify_staging_size())
  doesn't really fix the bug and this patch adds the missing part.
  
  It's a shame that I didn't make everything correct at the very beginning...
  
  MFC after:	2 weeks
  Sponsored by:	Microsoft

Modified:
  head/sys/boot/efi/loader/copy.c

Modified: head/sys/boot/efi/loader/copy.c
==============================================================================
--- head/sys/boot/efi/loader/copy.c	Wed Mar  8 02:47:59 2017	(r314890)
+++ head/sys/boot/efi/loader/copy.c	Wed Mar  8 02:50:29 2017	(r314891)
@@ -90,6 +90,8 @@ efi_verify_staging_size(unsigned long *n
 	}
 
 	i++;
+	p = NextMemoryDescriptor(p, dsz);
+
 	for ( ; i < ndesc;
 	     i++, p = NextMemoryDescriptor(p, dsz)) {
 		if (p->Type != EfiConventionalMemory &&


More information about the svn-src-all mailing list