Created
March 15, 2012 13:23
-
-
Save TauPan/2044175 to your computer and use it in GitHub Desktop.
patch from sadrul against invalid reads in ResizeLayer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit d89aeca5126ed9c08772d6cae50f4221be2e0c54 | |
Author: Friedrich Delgado Friedrichs <[email protected]> | |
Date: Fri Mar 12 14:08:16 2010 +0100 | |
apply patch from sadrul against invalid reads in ResizeLayer (http://pastebin.ca/1835311) | |
diff --git a/src/resize.c b/src/resize.c | |
index 7782c2b..5d1df4b 100644 | |
--- a/src/resize.c | |
+++ b/src/resize.c | |
@@ -369,8 +369,7 @@ struct display *norefdisp; | |
/* If 'flayer' and 'l' are for the same window, then we will not | |
* restore 'flayer'. */ | |
if (oldflayer && (l == oldflayer || Layer2Window(oldflayer) == p)) | |
- while (oldflayer->l_next) | |
- oldflayer = oldflayer->l_next; | |
+ oldflayer = NULL; | |
flayer = l; | |
@@ -413,7 +412,7 @@ struct display *norefdisp; | |
/* If we started resizing a non-flayer layer, then restore the flayer. | |
* Otherwise, flayer should already be updated to the topmost foreground layer. */ | |
- if (Layer2Window(flayer) != Layer2Window(oldflayer)) | |
+ if (oldflayer) | |
flayer = oldflayer; | |
display = olddisplay; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment