##// END OF EJS Templates
tcp server with malloc bug corrected.
imanay -
r107:108
parent child
Show More
@@ -325,7 +325,7
325 325 *(cmd + 4) = '\0';
326 326
327 327 int l = atoi(len) - 31; //Resto del tamaño total de la trama los 31 bytes fijos
328 rx_data = malloc(l);
328 rx_data = malloc(l + 1);
329 329 int i;
330 330 for (i = 30; i < 30 + l; i++)
331 331 *(rx_data + (i-30)) = *(frame + i);
General Comments 0
You need to be logged in to leave comments. Login now