[asterisk-dev] cdr_odbc.c is broken in trunk
Nick Gorham
nick at lurcher.org
Thu Jan 10 09:38:56 CST 2008
Tilghman Lesher wrote:
>On Thursday 10 January 2008 08:06:20 Nick Gorham wrote:
>
>
>>Michiel van Baak wrote:
>>
>>
>>>On 11:18, Thu 10 Jan 08, Nick Gorham wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>The change to use prepare_cb() in odbc_log became broken in r88182.
>>>>
>>>>The code calls SQLBindParameter on a local variable (timestr) but as it
>>>>now doesn't call SQLExecute in the same function when it finally gets to
>>>>SQLExecute that variable is out of scope.
>>>>
>>>>
>
>Out of scope, perhaps, but not out of memory. It's stored on the local stack,
>which is not deallocated until after the function returns. The address thus
>remains valid.
>
>
Of course its valid, but whats to stop it being used (and its contents
changed) as the stack in any function called between the
SQLBindParameter call and the SQLExecute. Do you know the stack depth
used by every function (including the std library)?
>
>
>>>Can you post this to http://bugs.digium.com with a unified
>>>diff as the patch ?
>>>Thank you.
>>>
>>>
>>Err, no as it happens, I don't see why I should provide anyone my
>>address and phone number to submit a bug fix to what I believed was a
>>GPL project!!!
>>
>>
>
>It's a dual licensed project, and we ask for an explicit license, along with
>the proviso that we actually check to ensure that you are legally entitled
>to license your changes (that the changes aren't actually owned by your
>company, for example).
>
>
>
Fair enough, I guess I should keep going to see how negative I can get
my karma to be while still trying to be helpfull.
Why not change to GPL3 to avoid the problem?
--
Nick
More information about the asterisk-dev
mailing list