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

Add a couple of sanity checks #1118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

QuChen88
Copy link
Contributor

@QuChen88 QuChen88 commented Mar 14, 2024

  • Handle failure in malloc() for temp port number file initialization to avoid NULL pointer de-referencing
  • Ensure value of c->rbytes (which is int type) is positive before using it in memmove, which implicitly cast it into size_t. This avoids undesired behavior if the value of c->rbytes is negative.
  • Avoid implicit conversion of unsigned int to signed int for keylen in proto_bin.c

 - Handle failure to malloc for temp port number file initialization.
 - Ensure value of c->rbytes is positive before using it in memmove
 - Avoid implicit conversion of unsigned int to signed int for keylen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants