Fixed an array bounds violation.
Let include guards comform to the Minix standard.
This commit is contained in:
		
							parent
							
								
									3922d45719
								
							
						
					
					
						commit
						1ce69592d2
					
				| @ -385,7 +385,7 @@ static void el3_read_StationAddress(dpeth_t * dep) | |||||||
| { | { | ||||||
|   unsigned int ix, rc; |   unsigned int ix, rc; | ||||||
| 
 | 
 | ||||||
|   for (ix = EE_3COM_NODE_ADDR; ix < SA_ADDR_LEN;) { |   for (ix = EE_3COM_NODE_ADDR; ix < SA_ADDR_LEN+EE_3COM_NODE_ADDR;) { | ||||||
| 	/* Accesses with word No. */ | 	/* Accesses with word No. */ | ||||||
| 	rc = el3_read_eeprom(dep->de_id_port, ix / 2); | 	rc = el3_read_eeprom(dep->de_id_port, ix / 2); | ||||||
| 	/* Swaps bytes of word */ | 	/* Swaps bytes of word */ | ||||||
|  | |||||||
| @ -7,8 +7,8 @@ and 82562 fast ethernet controllers. | |||||||
| Created:	Nov 2004 by Philip Homburg <philip@f-mnx.phicoh.com> | Created:	Nov 2004 by Philip Homburg <philip@f-mnx.phicoh.com> | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| #ifndef _INC_FXP_H | #ifndef _FXP_FXP_H | ||||||
| #define _INC_FXP_H | #define _FXP_FXP_H | ||||||
| 
 | 
 | ||||||
| #define VERBOSE 	0	/* display output during intialization */ | #define VERBOSE 	0	/* display output during intialization */ | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -6,8 +6,8 @@ Created:	Nov 2004 by Philip Homburg <philip@f-mnx.phicoh.com> | |||||||
| Definitions for the Media Independent (Ethernet) Interface | Definitions for the Media Independent (Ethernet) Interface | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| #ifndef _INC_MII_H | #ifndef _FXP_MII_H | ||||||
| #define _INC_MII_H | #define _FXP_MII_H | ||||||
| 
 | 
 | ||||||
| /* Registers in the Machine Independent Interface (MII) to the PHY.
 | /* Registers in the Machine Independent Interface (MII) to the PHY.
 | ||||||
|  * IEEE 802.3 (2000 Edition) Clause 22. |  * IEEE 802.3 (2000 Edition) Clause 22. | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| #ifndef _INC_SYS_TYPE_H | #ifndef _INCLUDE_SYS_TYPE_H | ||||||
| #define _INC_SYS_TYPE_H | #define _INCLUDE_SYS_TYPE_H | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * this files resolves conflicts between the file of the host system and |  * this files resolves conflicts between the file of the host system and | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| #ifndef _INC_INC_H | #ifndef _DS_INC_H | ||||||
| #define _INC_INC_H | #define _DS_INC_H | ||||||
| 
 | 
 | ||||||
| /* Header file including all needed system headers. */ | /* Header file including all needed system headers. */ | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| #ifndef _INC_PROTO_H | #ifndef _DS_PROTO_H | ||||||
| #define _INC_PROTO_H | #define _DS_PROTO_H | ||||||
| 
 | 
 | ||||||
| /* Function prototypes. */ | /* Function prototypes. */ | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -553,7 +553,7 @@ PUBLIC int do_subscribe(message *m_ptr) | |||||||
| 
 | 
 | ||||||
|   subp->flags = DSF_IN_USE | type_set; |   subp->flags = DSF_IN_USE | type_set; | ||||||
|   strcpy(subp->owner, owner); |   strcpy(subp->owner, owner); | ||||||
|   for(b = 0; b < BITMAP_CHUNKS(NR_DS_SUBS); b++) |   for(b = 0; b < BITMAP_CHUNKS(NR_DS_KEYS); b++) | ||||||
| 	subp->old_subs[b] = 0; | 	subp->old_subs[b] = 0; | ||||||
| 
 | 
 | ||||||
|   /* See if caller requested an instant initial list. */ |   /* See if caller requested an instant initial list. */ | ||||||
|  | |||||||
| @ -997,8 +997,6 @@ icmp_hdr_t *icmp_hdr; | |||||||
| { | { | ||||||
| 	int entries; | 	int entries; | ||||||
| 	int entry_size; | 	int entry_size; | ||||||
| 	u32_t addr; |  | ||||||
| 	i32_t pref; |  | ||||||
| 	u16_t lifetime; | 	u16_t lifetime; | ||||||
| 	int i; | 	int i; | ||||||
| 	char *bufp; | 	char *bufp; | ||||||
| @ -1053,6 +1051,9 @@ icmp_hdr_t *icmp_hdr; | |||||||
| 	for (i= 0, bufp= (char *)&icmp_hdr->ih_dun.uhd_data[0]; i< entries; i++, | 	for (i= 0, bufp= (char *)&icmp_hdr->ih_dun.uhd_data[0]; i< entries; i++, | ||||||
| 		bufp += entry_size) | 		bufp += entry_size) | ||||||
| 	{ | 	{ | ||||||
|  | 		u32_t addr; | ||||||
|  | 		i32_t pref; | ||||||
|  | 
 | ||||||
| 		addr= *(ipaddr_t *)bufp; | 		addr= *(ipaddr_t *)bufp; | ||||||
| 		pref= ntohl(*(u32_t *)(bufp+4)); | 		pref= ntohl(*(u32_t *)(bufp+4)); | ||||||
| 		ipr_add_oroute(icmp_port->icp_ipport, HTONL(0L), HTONL(0L),  | 		ipr_add_oroute(icmp_port->icp_ipport, HTONL(0L), HTONL(0L),  | ||||||
|  | |||||||
| @ -43,7 +43,7 @@ ioreq_t req; | |||||||
| 	int ent_no, r; | 	int ent_no, r; | ||||||
| 	nwio_ipconf_t ipconf_var; | 	nwio_ipconf_t ipconf_var; | ||||||
| 
 | 
 | ||||||
| 	assert (fd>=0 && fd<=IP_FD_NR); | 	assert (fd>=0 && fd<IP_FD_NR); | ||||||
| 	ip_fd= &ip_fd_table[fd]; | 	ip_fd= &ip_fd_table[fd]; | ||||||
| 
 | 
 | ||||||
| 	assert (ip_fd->if_flags & IFF_INUSE); | 	assert (ip_fd->if_flags & IFF_INUSE); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Kees van Reeuwijk
						Kees van Reeuwijk