[CoinUtils-tickets] [COIN-OR Common Utilities] #32:
CoinMessageHandler::stringValue_ overflow
COIN-OR Common Utilities
coin-trac at coin-or.org
Thu May 31 06:33:57 EDT 2007
#32: CoinMessageHandler::stringValue_ overflow
------------------------+---------------------------------------------------
Reporter: stefan | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: |
------------------------+---------------------------------------------------
Hi,
when I use the method
{{{ CoinMessageHandler::operator<< (const char *stringvalue) }}}
to send a message over a !CoinMessageHandler, I get a segmentation faults
after some time.
The problem seem to be that the line
{{{
stringValue_[numberStringFields_++] = stringvalue;
}}}
stores the messages in the array {{{stringValue_}}} which is of fixed size
10, and it is not checked whether {{{ numberStringFields_ }}} is exceeding
this limit. Also {{{numberStringFields_}}} seem to be never decreased, so
that after 10 calls the {{{stringValue_}}} array is full.
Since {{{stringValue_}}} seem to be of no use anyway, it may be just
removed?
I'm using !CoinUtils/trunk.
Best,
Stefan
--
Ticket URL: <https://projects.coin-or.org/CoinUtils/ticket/32>
COIN-OR Common Utilities <http://projects.coin-or.org/CoinUtils>
Common data structures and linear algebra functions for COIN-OR projects
More information about the CoinUtils-tickets
mailing list