git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1108
6f19259b-4bc3-4df7-8a09-
765794883524
IN UINTN Address\r
)\r
{\r
+ //\r
+ // @bug Check to make sure ImageSize is correct for the relocated image. \r
+ // it may only work for the file we start with and not the relocated image\r
+ //\r
+ if (Address >= ImageContext->ImageSize) {\r
+ ImageContext->ImageError = IMAGE_ERROR_INVALID_IMAGE_ADDRESS;\r
+ return NULL;\r
+ }\r
+\r
return (CHAR8 *)((UINTN) ImageContext->ImageAddress + Address);\r
}\r
\r