Skip to content

Instantly share code, notes, and snippets.

@libnex libnex/gd_io_dp.c.patch Secret
Last active Oct 10, 2016

Embed
What would you like to do?
Patch for Sec Bug #73280: Stack Buffer Overflow in GD dynamicGetbuf
diff --git a/ext/gd/libgd/gd_io_dp.c b/ext/gd/libgd/gd_io_dp.c.patch
index bfeb4cb..4dcedde 100644
--- a/ext/gd/libgd/gd_io_dp.c
+++ b/Users/elaw/gd_io_dp.c.patch
@@ -237,7 +237,7 @@ static int dynamicGetbuf (gdIOCtxPtr ctx, void *buf, int len)
if (remain >= len) {
rlen = len;
} else {
- if (remain == 0) {
+ if (remain <= 0) {
return EOF;
}
rlen = remain;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.