一个简单的有关问题, 但老提示该段内存不能read.郁闷ing

一个简单的问题, 但老提示该段内存不能read.郁闷ing
u_int8_t   *   pdata;
int   datalen   =   500;
pdata   =   (u_int8_t*)malloc(datalen   *   sizeof(u_int8_t)+1);                  
if(!pdata   ==   NULL)
{
fprintf(stderr, "not   enough   memory!\n ");
return   ;
}
memset(pdata,   0,   datalen*sizeof(u_int8_t));
memcpy(pdata,puh-> begin_tag,sizeof(u_char));
memcpy(pdata+sizeof(u_char),   puh-> uc_sn,sizeof(u_short));
memcpy(pdata+sizeof(u_char)+sizeof(u_short),puh-> uc_unknown1,sizeof(u_int));
memcpy(pdata+sizeof(u_char)+sizeof(u_short)+sizeof(u_int),puh-> uc_unknown2,sizeof(u_int));
memcpy(pdata+sizeof(u_char)+sizeof(u_short)+2*sizeof(u_int),puh-> uc_cipher_len,sizeof(u_short));
memcpy(pdata+sizeof(u_char)+sizeof(u_short)+2*sizeof(u_int)+sizeof(u_short),puh-> data,puh-> uc_cipher_len);

执行第一哥memcpy的时候,   就弹出来对话框提示该段内存不能read.
小弟分配的内存绝对够用,但老提示那个问题,真不知道怎么回事,   麻烦大侠指点啊!

------解决方案--------------------
puh这个指针是什么啊,是不是这个指针的问题.
------解决方案--------------------
if(!pdata == NULL)
------解决方案--------------------
puh-> begin_tag

检查puh是否有效
begin-tag是否有效
------解决方案--------------------
puh-> begin_tag 指向的地址有问题, 不可读.
------解决方案--------------------
puh-> begin_tag
===========
&puh-> begin_tag试试