Summary:ASTERISK-01126: Probable error in string handling in Cut function or DB storage
Reporter:Bill Michaelson (billmichaelson)Labels:
Date Opened:2004-02-29 09:45:16.000-0600Date Closed:2011-06-07 14:10:13
Versions:Frequency of
Description:Used Cut to parse a value stored in a DB.  In this example, the string was of the form "ORIGIN-DESTINATION", intended to be used in a speed dial implementation where ORIGIN is set into the caller ID and DESTINATION is the dialed number (It went via IAX - Voicepulse)  Cutting the first token worked OK, but cutting the second seemed to yield trailing garbage which caused the Dial to fail.  Successful work-around was to store the string with a trailing -, e.g. 6091234567-16098887777-

Suggests that Cut has problem, or equally likely, data obtained from dbget not terminated properly with end of string by the time it arrived at the Cut function.
Comments:By: Tilghman Lesher (tilghman) 2004-02-29 11:25:59.000-0600

Are you running CVS older than Feb 24?  There was a patch committed that day for app_cut.c

By: Mike Jagdis (mjagdis) 2004-03-02 07:20:43.000-0600

This is exactly the bug refered to by corydon76 and fixe in CVS. Guaranteed. :-)