[Bug 4423] New: speed_table has insufficient field size for termios speed values
bugzilla at busybox.net
bugzilla at busybox.net
Sun Oct 30 20:22:16 UTC 2011
https://bugs.busybox.net/show_bug.cgi?id=4423
Summary: speed_table has insufficient field size for termios
speed values
Product: Busybox
Version: 1.19.x
Platform: PC
OS/Version: Other
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at busybox.net
ReportedBy: mjt+busybox at tls.msk.ru
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
In libb/speed_table,c, speed_map struct uses two short integers (unsigned
short) to hold both speed and internal "value". But at least on BSD, unsigned
short is not sufficient to hold actual speed constant:
{B115200, 115200/256 + 0x8000U},
{B230400, 230400/256 + 0x8000U},
{B460800, 460800/256 + 0x8000U},
from FreeBSD /usr/include/bits/termios.h:
#define B115200 115200
#define B230400 230400
#define B460800 460800
which does not fit in unsigned short, which is 65535 max.
I'm not sure what to do here, maybe change both to integer (from short
integer), or use an inline switch stateent...
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list