External, Non-PPA KXStudio Repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1KB

  1. From: Matthew Vernon <matthew@debian.org>
  2. Date: Thu, 18 Jun 2020 19:32:51 +0100
  3. X-Dgit-Generated: 2:8.39-13 7b88c83f87391950756256072f886a08c44ed78f
  4. Subject: upstream patch fixing CVE-2020-14155
  5. This checks the size of the number after (?C as it is read, in order
  6. to avoid integer overflow.
  7. ---
  8. --- pcre3-8.39.orig/pcre_compile.c
  9. +++ pcre3-8.39/pcre_compile.c
  10. @@ -7086,17 +7086,19 @@ for (;; ptr++)
  11. int n = 0;
  12. ptr++;
  13. while(IS_DIGIT(*ptr))
  14. + {
  15. n = n * 10 + *ptr++ - CHAR_0;
  16. + if (n > 255)
  17. + {
  18. + *errorcodeptr = ERR38;
  19. + goto FAILED;
  20. + }
  21. + }
  22. if (*ptr != CHAR_RIGHT_PARENTHESIS)
  23. {
  24. *errorcodeptr = ERR39;
  25. goto FAILED;
  26. }
  27. - if (n > 255)
  28. - {
  29. - *errorcodeptr = ERR38;
  30. - goto FAILED;
  31. - }
  32. *code++ = n;
  33. PUT(code, 0, (int)(ptr - cd->start_pattern + 1)); /* Pattern offset */
  34. PUT(code, LINK_SIZE, 0); /* Default length */