问题描述
- 关于引起OpenSSL的heartbleed的问题代码
-
void process_heartbeat(unsigned char *hbMessage){ unsigned short hbtype; unsigned int payload; unsigned char* contents; hbtype = hbMessage[0]; payload = (((unsigned int)(hbMessage[1])<<8) |(((unsigned int)(hbMessage[2]))); hbMessage += 3; contents = hbMessage; if(hbtype == TLS1_HB_REQUEST){ unsigned char* response; response=(unsigned char *)malloc(1+2+payload+padding); ... memcpy(response,pl,payload); ... } ... }
上面这段代码会引发heartbleed问题 具体是什么情况
时间: 2024-12-31 00:39:16