summaryrefslogtreecommitdiffstats
path: root/src/image/embedded.c
diff options
context:
space:
mode:
authorMichael Brown2008-06-04 01:02:23 +0200
committerMichael Brown2008-06-04 01:02:23 +0200
commitd615b00443e9265f87f6a08e84c28eb5dcee6f49 (patch)
treead76c6eeda20e136e1e6c0e992abffcbf1c344a0 /src/image/embedded.c
parent[iSCSI] Produce meaningful errors on login failure (diff)
downloadipxe-d615b00443e9265f87f6a08e84c28eb5dcee6f49.tar.gz
ipxe-d615b00443e9265f87f6a08e84c28eb5dcee6f49.tar.xz
ipxe-d615b00443e9265f87f6a08e84c28eb5dcee6f49.zip
[embed] Add missing register_image() to image/embedded.c
When the embedded image is a script, the unregister_image() performed by image/script.c corrupts memory, since image/embedded.c omitted the call to register_image(). This is the first bug fixed using Stefan Hajnoczi's gdb stub for gPXE.
Diffstat (limited to 'src/image/embedded.c')
-rw-r--r--src/image/embedded.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/image/embedded.c b/src/image/embedded.c
index e2782a43..97833130 100644
--- a/src/image/embedded.c
+++ b/src/image/embedded.c
@@ -39,6 +39,7 @@ struct image *embedded_image(void)
return image = NULL;
}
copy_to_user(image->data, 0, _embedded_image_start, eisize);
+ register_image(image);
/* Reclaim embedded image memory */
reclaimed = 1;