diff options
| author | Simon Rettberg | 2026-01-28 12:53:53 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2026-01-28 12:53:53 +0100 |
| commit | 8e82785c584dc13e20f9229decb95bd17bbe9cd1 (patch) | |
| tree | a8b359e59196be5b2e3862bed189107f4bc9975f /src/core/pixbuf.c | |
| parent | Merge branch 'master' into openslx (diff) | |
| parent | [prefix] Make unlzma.S compatible with 386 class CPUs (diff) | |
| download | ipxe-openslx.tar.gz ipxe-openslx.tar.xz ipxe-openslx.zip | |
Merge branch 'master' into openslxopenslx
Diffstat (limited to 'src/core/pixbuf.c')
| -rw-r--r-- | src/core/pixbuf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/pixbuf.c b/src/core/pixbuf.c index 641a0fb53..df187f93d 100644 --- a/src/core/pixbuf.c +++ b/src/core/pixbuf.c @@ -22,6 +22,7 @@ */ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); +FILE_SECBOOT ( PERMITTED ); /** @file * @@ -30,6 +31,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); */ #include <stdlib.h> +#include <string.h> #include <errno.h> #include <ipxe/umalloc.h> #include <ipxe/image.h> @@ -65,7 +67,8 @@ struct pixel_buffer * alloc_pixbuf ( unsigned int width, unsigned int height ) { ref_init ( &pixbuf->refcnt, free_pixbuf ); pixbuf->width = width; pixbuf->height = height; - pixbuf->len = ( width * height * sizeof ( uint32_t ) ); + pixbuf->pixels = ( width * height ); + pixbuf->len = ( pixbuf->pixels * sizeof ( uint32_t ) ); /* Check for multiplication overflow */ if ( ( width != 0 ) && |
