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