Skip to content
Browse files

Fixed another SIGSEGV

  • Loading branch information...
1 parent a7f750a commit 707eb6159b5f4fe1db29735b193a353f4156f6ca @xHire committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/udp.c
View
2 src/udp.c
@@ -184,7 +184,7 @@ int udp_ipv6(struct s_ethernet *eth6, struct s_ipv6 *ip6, char *payload)
}
/* allocate memory for translated packet */
- packet_size = sizeof(struct s_ipv4) + ip6->len;
+ packet_size = sizeof(struct s_ipv4) + htons(ip6->len);
if ((packet = (unsigned char *) malloc(packet_size)) == NULL) {
fprintf(stderr, "[Error] Lack of free memory\n");
return 1;

0 comments on commit 707eb61

Please sign in to comment.
Something went wrong with that request. Please try again.