mirror of
https://github.com/hufrea/byedpi.git
synced 2024-12-21 22:05:32 +00:00
Fixes from CodeQL (#223)
* Fix code scanning alert no. 4: Multiplication result converted to larger type Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Fix code scanning alert no. 5: Multiplication result converted to larger type Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
0a06ba41c9
commit
75671fa11c
4
desync.c
4
desync.c
@ -469,7 +469,7 @@ ssize_t desync(int sfd, char *buffer, size_t bfsize,
|
||||
pos += gen_offset(part.pos,
|
||||
part.flag, n - pos - 5, lp, type, host_pos - 5, len);
|
||||
|
||||
pos += part.s * (part.r - r);
|
||||
pos += (long)part.s * (part.r - r);
|
||||
if (pos < lp) {
|
||||
LOG(LOG_E, "tlsrec cancel: %ld < %ld\n", pos, lp);
|
||||
break;
|
||||
@ -501,7 +501,7 @@ ssize_t desync(int sfd, char *buffer, size_t bfsize,
|
||||
long pos = gen_offset(part.pos,
|
||||
part.flag, n, lp, type, host_pos, len);
|
||||
|
||||
pos += part.s * (part.r - r);
|
||||
pos += (long)part.s * (part.r - r);
|
||||
|
||||
if (!(part.flag & OFFSET_START) && offset && pos <= offset) {
|
||||
LOG(LOG_S, "offset: %zd, skip\n", offset);
|
||||
|
Loading…
Reference in New Issue
Block a user