t1lib-5.1.2-CVE-2010-2642_2011-0433_2011-5244.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. CVE-2010-2642, CVE-2011-0433 and CVE-2011-5244
  2. CVE-2010-2642:
  3. ==============
  4. Upstream-Bug: https://bugzilla.gnome.org/show_bug.cgi?id=643882
  5. Upstream-Fix: https://git.gnome.org/browse/evince/commit/?id=efadec4ffcdde3373f6f4ca0eaac98dc963c4fd5
  6. CVE-2011-0433:
  7. ==============
  8. Upstream-Bug: https://bugzilla.gnome.org/show_bug.cgi?id=640923
  9. Upstream-Fix: https://git.gnome.org/browse/evince/commit/?id=439c5070022eab6cef7266aab47f978058012c72
  10. CVE-2011-5244:
  11. ==============
  12. Upstream-Bug: https://bugzilla.gnome.org/show_bug.cgi?id=643882
  13. Upstream-Fix: https://git.gnome.org/browse/evince/commit/?id=efadec4ffcdde3373f6f4ca0eaac98dc963c4fd5
  14. Origin: https://bugs.debian.org/652996
  15. diff --git a/lib/t1lib/parseAFM.c b/lib/t1lib/parseAFM.c
  16. index 6a31d7f..ba64541 100644
  17. --- a/lib/t1lib/parseAFM.c
  18. +++ b/lib/t1lib/parseAFM.c
  19. @@ -199,7 +199,9 @@ static char *token(stream)
  20. idx = 0;
  21. while (ch != EOF && ch != ' ' && ch != CR && ch != LF &&
  22. - ch != CTRL_Z && ch != '\t' && ch != ':' && ch != ';'){
  23. + ch != CTRL_Z && ch != '\t' && ch != ':' && ch != ';'
  24. + && idx < (MAX_NAME -1))
  25. + {
  26. ident[idx++] = ch;
  27. ch = fgetc(stream);
  28. } /* while */
  29. @@ -235,7 +237,7 @@ static char *linetoken(stream)
  30. while ((ch = fgetc(stream)) == ' ' || ch == '\t' );
  31. idx = 0;
  32. - while (ch != EOF && ch != CR && ch != LF && ch != CTRL_Z)
  33. + while (ch != EOF && ch != CR && ch != LF && ch != CTRL_Z && idx < (MAX_NAME - 1))
  34. {
  35. ident[idx++] = ch;
  36. ch = fgetc(stream);