Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1b2aa7f authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

fddi: 64 bit bug in smt_add_para()



The intent was to set 4 bytes of data so that's why the sp_len is set
to 4 on the next line.  The cast to u_long pointer clears 8 bytes
on 64 bit arches.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@tempietto.lan>
parent b27393ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -673,7 +673,7 @@ void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para,
			sm_pm_get_ls(smc,port_to_mib(smc,port))) ;
		break ;
	case SMT_P_REASON :
		* (u_long *) to = 0 ;
		*(u32 *)to = 0 ;
		sp_len = 4 ;
		goto sp_done ;
	case SMT_P1033 :			/* time stamp */