CVE-2014-0237.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. made apply cleanly based on
  2. commit b8acc83781d5a24cc5101e525d15efe0482c280d
  3. Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Tue May 6 18:20:39 2014 +0000
  5. Remove loop that kept reading the same offset (Jan Kaluza)
  6. diff --git a/src/cdf.c b/src/cdf.c
  7. index f7c46ae..c591a14 100644
  8. --- a/src/cdf.c
  9. +++ b/src/cdf.c
  10. @@ -932,7 +932,7 @@ int
  11. cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h,
  12. cdf_summary_info_header_t *ssi, cdf_property_info_t **info, size_t *count)
  13. {
  14. - size_t i, maxcount;
  15. + size_t maxcount;
  16. const cdf_summary_info_header_t *si =
  17. CAST(const cdf_summary_info_header_t *, sst->sst_tab);
  18. const cdf_section_declaration_t *sd =
  19. @@ -947,21 +947,13 @@ cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h,
  20. ssi->si_os = CDF_TOLE2(si->si_os);
  21. ssi->si_class = si->si_class;
  22. cdf_swap_class(&ssi->si_class);
  23. - ssi->si_count = CDF_TOLE2(si->si_count);
  24. + ssi->si_count = CDF_TOLE4(si->si_count);
  25. *count = 0;
  26. maxcount = 0;
  27. *info = NULL;
  28. - for (i = 0; i < CDF_TOLE4(si->si_count); i++) {
  29. - if (i >= CDF_LOOP_LIMIT) {
  30. - DPRINTF(("Unpack summary info loop limit"));
  31. - errno = EFTYPE;
  32. - return -1;
  33. - }
  34. - if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset),
  35. - info, count, &maxcount) == -1) {
  36. - return -1;
  37. - }
  38. - }
  39. + if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset), info,
  40. + count, &maxcount) == -1)
  41. + return -1;
  42. return 0;
  43. }