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