Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different small fixes #3247

Merged
merged 2 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/map/clif.c
Original file line number Diff line number Diff line change
Expand Up @@ -26154,8 +26154,17 @@ static int clif_parse(int fd)
}
}

if ((int)RFIFOREST(fd) < packet_len)
if ((int)RFIFOREST(fd) < packet_len) {
if (sd == NULL) {
if (packet_db[cmd].func != clif->pWantToConnection) {
ShowWarning("clif_parse: Received first unsupported packet (packet 0x%04x (0x%04x), %"PRIuS" bytes received), disconnecting session #%d.\n",
(unsigned int)cmd, RFIFOW(fd, 0), RFIFOREST(fd), fd);
sockt->eof(fd);
}
}

return 0; // not enough data received to form the packet
}

if( battle_config.packet_obfuscation == 2 || cmd != RFIFOW(fd, 0) || (sd && sd->parse_cmd_func == clif->parse_cmd_decrypt) ) {
// Note: Overriding const qualifier to re-inject the decoded packet ID.
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function run_server {
rm -rf core* || true
CRASH_PLEASE=1 $1 --run-once $2 2>runlog.txt
export errcode=$?
export teststr=$(head -c 10000 runlog.txt)
export teststr=$(head -c 10000 runlog.txt|grep -v "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.")
if [[ -n "${teststr}" ]]; then
echo "Errors found in running server $1."
head -c 10000 runlog.txt
Expand Down
Loading