Skip to content

Commit

Permalink
fddi: 64 bit bug in smt_add_para()
Browse files Browse the repository at this point in the history
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@tempietto.lan>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Sep 2, 2012
1 parent b27393a commit e1b2aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/fddi/skfp/pmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit e1b2aa7

Please sign in to comment.