Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 543096 - dev-java/rxtx-2.2_pre2 crashes on long device names
Summary: dev-java/rxtx-2.2_pre2 crashes on long device names
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
Keywords: PATCH
Depends on:
Reported: 2015-03-12 22:27 UTC by nebojsa
Modified: 2015-03-16 15:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

replaces unsafe sprintf with snprintf (rxtx-2.2_pre2-long-devname.patch,11.91 KB, patch)
2015-03-12 22:29 UTC, nebojsa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nebojsa 2015-03-12 22:27:42 UTC
When trying to open serial device file /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AM022ULJ-if00-port0 I receive 
*** buffer overflow detected ***: /usr/lib/jvm//oracle-jdk-bin-1.8/bin/java terminated
======= Backtrace: =========

Reproducible: Always

Steps to Reproduce:
1.Try to open longer device file name

rxtx does some internal logging using sprintf and a char buffer 80 bytes long. Longer file name does not fit in this buffer, and no length checking is done.
Comment 1 nebojsa 2015-03-12 22:29:23 UTC
Created attachment 398766 [details, diff]
replaces unsafe sprintf with snprintf