006-CVE-2015-7697-infinite-loop.patch 421 B

123456789101112131415
  1. --- a/extract.c
  2. +++ b/extract.c
  3. @@ -2728,6 +2728,12 @@ __GDEF
  4. int repeated_buf_err;
  5. bz_stream bstrm;
  6. + if (G.incnt <= 0 && G.csize <= 0L) {
  7. + /* avoid an infinite loop */
  8. + Trace((stderr, "UZbunzip2() got empty input\n"));
  9. + return 2;
  10. + }
  11. +
  12. #if (defined(DLL) && !defined(NO_SLIDE_REDIR))
  13. if (G.redirect_slide)
  14. wsize = G.redirect_size, redirSlide = G.redirect_buffer;