patch-src_it_itread_c 690 B

1234567891011121314151617181920
  1. $OpenBSD: patch-src_it_itread_c,v 1.1 2013/10/14 07:17:21 dcoppa Exp $
  2. Fix heap-based buffer overflow in the it_read_envelope function
  3. (CVE-2006-3668)
  4. --- src/it/itread.c.orig Mon Aug 8 02:18:41 2005
  5. +++ src/it/itread.c Fri Oct 11 16:37:22 2013
  6. @@ -292,6 +292,11 @@ static int it_read_envelope(IT_ENVELOPE *envelope, DUM
  7. envelope->flags = dumbfile_getc(f);
  8. envelope->n_nodes = dumbfile_getc(f);
  9. + if(envelope->n_nodes > 25) {
  10. + TRACE("IT error: wrong number of envelope nodes (%d)\n", envelope->n_nodes);
  11. + envelope->n_nodes = 0;
  12. + return -1;
  13. + }
  14. envelope->loop_start = dumbfile_getc(f);
  15. envelope->loop_end = dumbfile_getc(f);
  16. envelope->sus_loop_start = dumbfile_getc(f);