From 414edcd32aa54bad8827e7c74cace168006c5fab Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Tue, 6 Sep 2005 15:17:52 -0700 Subject: [PATCH] [PATCH] vt: fix possible memory corruption in complement_pos Based on a patch from Andr Pereira de Almeida It might be possible for the saved pointer (*p) to become invalid in between vc_resizes, so saving the screen offset instead of the screen pointer is saner. This bug is very hard to trigger though, but Andre probably did, if he's submitting this patch. Anyway, with Andre's patch, it's still possible for the offsets to be still illegal, if the new screen size is smaller than the old one. So I've also added checks if the offsets are still within the screenbuffer size. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed