mirror of
https://github.com/ipxe/ipxe
synced 2025-12-24 15:23:42 +03:00
[pxe] Remove userptr_t from PXE NBP image parsing
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -142,7 +142,7 @@ int pxe_probe ( struct image *image ) {
|
|||||||
* @ret rc Return status code
|
* @ret rc Return status code
|
||||||
*/
|
*/
|
||||||
int pxe_probe_no_mz ( struct image *image ) {
|
int pxe_probe_no_mz ( struct image *image ) {
|
||||||
uint16_t magic;
|
const uint16_t *magic;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* Probe PXE image */
|
/* Probe PXE image */
|
||||||
@@ -152,9 +152,9 @@ int pxe_probe_no_mz ( struct image *image ) {
|
|||||||
/* Reject image with an "MZ" signature which may indicate an
|
/* Reject image with an "MZ" signature which may indicate an
|
||||||
* EFI image incorrectly handed out to a BIOS system.
|
* EFI image incorrectly handed out to a BIOS system.
|
||||||
*/
|
*/
|
||||||
if ( image->len >= sizeof ( magic ) ) {
|
if ( image->len >= sizeof ( *magic ) ) {
|
||||||
copy_from_user ( &magic, image->data, 0, sizeof ( magic ) );
|
magic = image->data;
|
||||||
if ( magic == cpu_to_le16 ( EFI_IMAGE_DOS_SIGNATURE ) ) {
|
if ( *magic == cpu_to_le16 ( EFI_IMAGE_DOS_SIGNATURE ) ) {
|
||||||
DBGC ( image, "IMAGE %p may be an EFI image\n",
|
DBGC ( image, "IMAGE %p may be an EFI image\n",
|
||||||
image );
|
image );
|
||||||
return -ENOTTY;
|
return -ENOTTY;
|
||||||
|
|||||||
Reference in New Issue
Block a user