fix: moved variables init

This commit is contained in:
Павел Овчинников 2025-04-07 21:23:06 +03:00
parent c3355c7ca8
commit f080b7fab6
1 changed files with 3 additions and 1 deletions

View File

@ -472,6 +472,9 @@ int my_tcp_syn() {
pseudo_header = nullptr;
temp_buf = nullptr;
packet = nullptr;
checksum_ptr = 0;
checksum_sum = 0;
checksum_len = 0;
// === Основная логика процедуры ===
// 1. Создание raw-сокета
@ -522,7 +525,6 @@ int my_tcp_syn() {
// Встроенный расчет контрольной суммы
checksum_ptr = (uint16_t *)temp_buf;
checksum_sum = 0;
checksum_len = sizeof(temp_buf);
while (checksum_len > 1) {