mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed handling improper buffer lengths in the EIT parser
This commit is contained in:
		| @@ -57,6 +57,7 @@ Alberto Carraro <bertocar@tin.it> | |||||||
| Deti Fliegl <deti@fliegl.de> | Deti Fliegl <deti@fliegl.de> | ||||||
|  for implementing the 'CurrentChannel' setup parameter |  for implementing the 'CurrentChannel' setup parameter | ||||||
|  for fixing setting the OSD size in the 'Confirm' interface call |  for fixing setting the OSD size in the 'Confirm' interface call | ||||||
|  |  for fixing handling improper buffer lengths in the EIT parser | ||||||
|  |  | ||||||
| Dave Chapman <dave@dchapman.com> | Dave Chapman <dave@dchapman.com> | ||||||
|  for implementing support for the teletext PID |  for implementing support for the teletext PID | ||||||
|   | |||||||
							
								
								
									
										5
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -921,3 +921,8 @@ Video Disk Recorder Revision History | |||||||
| - Status messages are now displayed centered. | - Status messages are now displayed centered. | ||||||
| - Removed the 'Tools' subdirectory from the VDR archive. All contributed tools | - Removed the 'Tools' subdirectory from the VDR archive. All contributed tools | ||||||
|   can now be found at ftp://ftp.cadsoft.de/pub/people/kls/vdr/Tools. |   can now be found at ftp://ftp.cadsoft.de/pub/people/kls/vdr/Tools. | ||||||
|  |  | ||||||
|  | 2002-01-29: Version 0.99pre3 | ||||||
|  |  | ||||||
|  | - Fixed handling improper buffer lengths in the EIT parser (thanks to Deti | ||||||
|  |   Fliegl). | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								config.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								config.h
									
									
									
									
									
								
							| @@ -4,7 +4,7 @@ | |||||||
|  * See the main source file 'vdr.c' for copyright information and |  * See the main source file 'vdr.c' for copyright information and | ||||||
|  * how to reach the author. |  * how to reach the author. | ||||||
|  * |  * | ||||||
|  * $Id: config.h 1.88 2002/01/19 16:06:53 kls Exp $ |  * $Id: config.h 1.89 2002/01/29 21:53:32 kls Exp $ | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #ifndef __CONFIG_H | #ifndef __CONFIG_H | ||||||
| @@ -18,7 +18,7 @@ | |||||||
| #include "eit.h" | #include "eit.h" | ||||||
| #include "tools.h" | #include "tools.h" | ||||||
|  |  | ||||||
| #define VDRVERSION "0.99pre2" | #define VDRVERSION "0.99pre3" | ||||||
|  |  | ||||||
| #define MAXPRIORITY 99 | #define MAXPRIORITY 99 | ||||||
| #define MAXLIFETIME 99 | #define MAXLIFETIME 99 | ||||||
|   | |||||||
| @@ -946,9 +946,9 @@ struct Pid *siParsePMT (u_char *); | |||||||
| struct LIST *siParseSDT (u_char *); | struct LIST *siParseSDT (u_char *); | ||||||
| struct LIST *siParseEIT (u_char *); | struct LIST *siParseEIT (u_char *); | ||||||
| time_t siParseTDT (u_char *); | time_t siParseTDT (u_char *); | ||||||
| void siParseDescriptors (struct LIST *, u_char *, u_int, u_char); | void siParseDescriptors (struct LIST *, u_char *, int, u_char); | ||||||
| void siParseDescriptor (struct LIST *, u_char *); | void siParseDescriptor (struct LIST *, u_char *); | ||||||
| char *siGetDescriptorText (u_char *, u_int); | char *siGetDescriptorText (u_char *, int); | ||||||
| u_long crc32 (char *data, int len); | u_long crc32 (char *data, int len); | ||||||
|  |  | ||||||
| /* si_debug_services.c */ | /* si_debug_services.c */ | ||||||
|   | |||||||
| @@ -40,7 +40,7 @@ struct LIST *siParsePAT (u_char *Buffer) | |||||||
|    pat_t               *Pat; |    pat_t               *Pat; | ||||||
|    pat_prog_t          *PatProgram; |    pat_prog_t          *PatProgram; | ||||||
|    u_char              *Ptr; |    u_char              *Ptr; | ||||||
|    u_int                SectionLength; |    int                  SectionLength; | ||||||
|    int                  TransportStreamID; |    int                  TransportStreamID; | ||||||
|    int                  PatVersion; |    int                  PatVersion; | ||||||
|    struct Program      *Program; |    struct Program      *Program; | ||||||
| @@ -87,7 +87,7 @@ struct Pid *siParsePMT (u_char *Buffer) | |||||||
|    pmt_t               *Pmt; |    pmt_t               *Pmt; | ||||||
|    pmt_info_t          *PmtInfo; |    pmt_info_t          *PmtInfo; | ||||||
|    u_char              *Ptr; |    u_char              *Ptr; | ||||||
|    u_int                SectionLength, ProgramInfoLength, |    int                  SectionLength, ProgramInfoLength, | ||||||
|                         StreamLength, LoopLength; |                         StreamLength, LoopLength; | ||||||
|    int                  ProgramID; |    int                  ProgramID; | ||||||
|    int                  PcrID; |    int                  PcrID; | ||||||
| @@ -150,7 +150,7 @@ struct LIST *siParseSDT (u_char *Buffer) | |||||||
|    sdt_t               *Sdt; |    sdt_t               *Sdt; | ||||||
|    sdt_descr_t         *SdtDescriptor; |    sdt_descr_t         *SdtDescriptor; | ||||||
|    u_char              *Ptr; |    u_char              *Ptr; | ||||||
|    u_int                SectionLength, LoopLength; |    int                  SectionLength, LoopLength; | ||||||
|    int                  TransportStreamID; |    int                  TransportStreamID; | ||||||
|    int                  SdtVersion; |    int                  SdtVersion; | ||||||
|    int                  OriginalNetworkID; |    int                  OriginalNetworkID; | ||||||
| @@ -229,7 +229,7 @@ struct LIST *siParseEIT (u_char *Buffer) | |||||||
|    eit_t               *Eit; |    eit_t               *Eit; | ||||||
|    eit_event_t         *EitEvent; |    eit_event_t         *EitEvent; | ||||||
|    u_char              *Ptr; |    u_char              *Ptr; | ||||||
|    u_int                SectionLength, LoopLength; |    int                  SectionLength, LoopLength; | ||||||
|    int                  ServiceID; |    int                  ServiceID; | ||||||
|    int                  EitVersion; |    int                  EitVersion; | ||||||
|    int                  TransportStreamID; |    int                  TransportStreamID; | ||||||
| @@ -316,7 +316,7 @@ time_t siParseTDT (u_char *Buffer) | |||||||
| { | { | ||||||
|    tdt_t               *Tdt; |    tdt_t               *Tdt; | ||||||
|    u_char              *Ptr; |    u_char              *Ptr; | ||||||
|    u_int                SectionLength; |    int                  SectionLength; | ||||||
|    int                  TdtVersion; |    int                  TdtVersion; | ||||||
|    time_t               CurrentTime; |    time_t               CurrentTime; | ||||||
|  |  | ||||||
| @@ -339,9 +339,9 @@ time_t siParseTDT (u_char *Buffer) | |||||||
|  |  | ||||||
|  |  | ||||||
| void siParseDescriptors (struct LIST *Descriptors, u_char *Buffer, | void siParseDescriptors (struct LIST *Descriptors, u_char *Buffer, | ||||||
|                          u_int Length, u_char TableID) |                          int Length, u_char TableID) | ||||||
| { | { | ||||||
|    u_int        DescriptorLength; |    int          DescriptorLength; | ||||||
|    u_char      *Ptr; |    u_char      *Ptr; | ||||||
|  |  | ||||||
|    DescriptorLength = 0; |    DescriptorLength = 0; | ||||||
| @@ -838,7 +838,7 @@ void siParseDescriptor (struct LIST *Descriptors, u_char *Buffer) | |||||||
| /* | /* | ||||||
|  *  ToDo:  ETSI conformal text definition |  *  ToDo:  ETSI conformal text definition | ||||||
|  */ |  */ | ||||||
| char *siGetDescriptorText (u_char *Buffer, u_int Length) | char *siGetDescriptorText (u_char *Buffer, int Length) | ||||||
| { | { | ||||||
|    char *tmp, *result; |    char *tmp, *result; | ||||||
|    int i; |    int i; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user