mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-05-02 08:50:18 +00:00
IRC: fix memory access (#1787)
This commit is contained in:
parent
e674a8ae37
commit
550f3e5b9d
1 changed files with 1 additions and 1 deletions
|
|
@ -408,7 +408,7 @@ void ndpi_search_irc_tcp(struct ndpi_detection_module_struct *ndpi_struct, struc
|
||||||
if(user) {
|
if(user) {
|
||||||
char buf[32], msg[64], *sp;
|
char buf[32], msg[64], *sp;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%.*s", packet->payload_packet_len - 5, &user[5]);
|
snprintf(buf, sizeof(buf), "%.*s", (int)(packet->payload_packet_len - (user + 5 - (char *)packet->payload)), user + 5);
|
||||||
if((sp = strchr(buf, ' ')) != NULL)
|
if((sp = strchr(buf, ' ')) != NULL)
|
||||||
sp[0] = '\0';
|
sp[0] = '\0';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue