From 09c3bdb186868204cb03d457244e05e12eb685d6 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 21 Mar 2021 12:40:41 +0100 Subject: Hardened syscalls --- apps/wm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/wm.c b/apps/wm.c index 10f13d3..531559f 100644 --- a/apps/wm.c +++ b/apps/wm.c @@ -84,8 +84,8 @@ static struct window *window_new(struct client client, const char *name, struct if ((flags & WF_NO_FB) != 0) { win->ctx.fb = NULL; } else { - win->shid = shalloc(size.y * win->ctx.pitch); - win->ctx.fb = shaccess(win->shid); + assert(shalloc(win->ctx.bytes, &win->shid) == EOK); + assert(shaccess(win->shid, (u32 *)&win->ctx.fb, &win->ctx.bytes) == EOK); } win->client = client; win->flags = flags; -- cgit v1.2.3