[pnm] Remove userptr_t from PNM image parsing

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-04-25 17:21:52 +01:00
parent d29651ddec
commit 4c8bf666f4
4 changed files with 29 additions and 32 deletions

View File

@@ -65,7 +65,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 ) &&