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

Serial4j post-nullary connection handling enhancements #45

Merged
merged 8 commits into from
Sep 9, 2024

Conversation

pavly-gerges
Copy link
Member

@pavly-gerges pavly-gerges commented Sep 9, 2024

This PR adds some enhancements for the C++ and the Java APIs after introducing device nullary connections detection mechanisms:

  • C++ SerialPort: define default values to protect against memory access violations and memory segmentation.
  • Java TerminalDevice#openPort(): updated the Java SerialPort structure SerialPort#ioFlag from the FilePermissions API for the native SerialPort to operate correctly.
  • C++ TerminalDevice::closePort(): updated the native SerialPort structure SerialPort::portOpened, SerialPort::ioFlag, and SerialPort::fd for the JVM SerialPort to operate correctly.
  • C++ TerminalDevice::fetchSerialPorts(AddressBuffer *): implemented anti-buffer-overflow mechanisms for the dynamic path allocator using a compatible buffer size with the required path of the device in query.

@pavly-gerges pavly-gerges added enhancement New feature or request jni JNI-related stuff. system-design System-designing related stuff. labels Sep 9, 2024
@pavly-gerges pavly-gerges merged commit b0549f3 into master Sep 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jni JNI-related stuff. system-design System-designing related stuff.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant