-
-
Save anonymous/c8c9d299ebdc0fbc6aa345b7ba64a92e to your computer and use it in GitHub Desktop.
Patch for 72850
This file contains 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 f77f0edc705bbf403742029106a18924c50d40f6 | |
Author: Stanislav Malyshev <stas@php.net> | |
Date: Tue Aug 16 16:03:44 2016 -0700 | |
Fix bug #72850 - integer overflow in uuencode | |
diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c | |
index cd35c28..a31f14d 100644 | |
--- a/ext/standard/uuencode.c | |
+++ b/ext/standard/uuencode.c | |
@@ -200,6 +200,11 @@ PHP_FUNCTION(convert_uuencode) | |
} | |
dst_len = php_uuencode(src, src_len, &dst); | |
+ if (dst_len < 0) { | |
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "String too long, max length is %d", INT_MAX); | |
+ efree(dst); | |
+ RETURN_FALSE; | |
+ } | |
RETURN_STRINGL(dst, dst_len, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment