Skip to content

Commit 208d80a

Browse files
david-paceClaudia Pellegrino
authored and
Claudia Pellegrino
committed
[issue NeuronRobotics#229] Prevent Buffer Overflows When Constructing Messages
- increase buffer sizes - change sprintf() calls to snprintf() calls introducing respective maximum size arguments - remove #if / #endif blocks dealing with system names on Linux - comment message informing the user that locking worked - correct variable name and remove unused buffer name[80] in uucp_lock() closes NeuronRobotics#229
1 parent d7a150e commit 208d80a

File tree

2 files changed

+93
-112
lines changed

2 files changed

+93
-112
lines changed

src/main/c/include/SerialImp.h

-1
Original file line numberDiff line numberDiff line change
@@ -501,5 +501,4 @@ int check_lock_pid( const char *, int );
501501
int printj(JNIEnv *env, wchar_t *fmt, ...);
502502

503503
#define UNEXPECTED_LOCK_FILE "RXTX Error: Unexpected lock file: %s\n Please report to the RXTX developers\n"
504-
#define LINUX_KERNEL_VERSION_ERROR "\n\n\nRXTX WARNING: This library was compiled to run with OS release %s and you are currently running OS release %s. In some cases this can be a problem. Try recompiling RXTX if you notice strange behavior. If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n"
505504
#define UUCP_ERROR "\n\n\nRXTX WARNING: This library requires the user running applications to be in\ngroup uucp. Please consult the INSTALL documentation. More information is\navaiable under the topic 'How can I use Lock Files with rxtx?'\n"

0 commit comments

Comments
 (0)