diff -r d91da96a55bf Misc/NEWS --- a/Misc/NEWS Thu May 16 22:47:47 2013 +0100 +++ b/Misc/NEWS Fri May 17 21:02:48 2013 +0300 @@ -12,7 +12,15 @@ Library ------- +<<<<<<< - Issue #17981: Closed socket on error in SysLogHandler. +======= +- Issue #17016: Get rid of possible pointer wraparounds and integer overflows + in the re module. Patch by Nickolai Zeldovich. + +- Issue #17536: Add to webbrowser's browser list: xdg-open, gvfs-open, + www-browser, x-www-browser, chromium browsers, iceweasel, iceape. +>>>>>>> - Issue #17754: Make ctypes.util.find_library() independent of the locale. @@ -93,9 +101,6 @@ - Issue #17341: Include the invalid name in the error messages from re about invalid group names. -- Issue #17016: Get rid of possible pointer wraparounds and integer overflows - in the re module. Patch by Nickolai Zeldovich. - - Issue #17536: Add to webbrowser's browser list: xdg-open, gvfs-open, www-browser, x-www-browser, chromium browsers, iceweasel, iceape. diff -r d91da96a55bf Modules/_sre.c --- a/Modules/_sre.c Thu May 16 22:47:47 2013 +0100 +++ b/Modules/_sre.c Fri May 17 21:02:48 2013 +0300 @@ -1028,7 +1028,7 @@ TRACE(("|%p|%p|REPEAT_ONE %d %d\n", ctx->pattern, ctx->ptr, ctx->pattern[1], ctx->pattern[2])); - if (ctx->pattern[1] > end - ctx->ptr) + if ((Py_ssize_t) ctx->pattern[1] > end - ctx->ptr) RETURN_FAILURE; /* cannot match */ state->ptr = ctx->ptr; @@ -1111,7 +1111,7 @@ TRACE(("|%p|%p|MIN_REPEAT_ONE %d %d\n", ctx->pattern, ctx->ptr, ctx->pattern[1], ctx->pattern[2])); - if (ctx->pattern[1] > end - ctx->ptr) + if ((Py_ssize_t) ctx->pattern[1] > end - ctx->ptr) RETURN_FAILURE; /* cannot match */ state->ptr = ctx->ptr;