[asterisk-bugs] [JIRA] (ASTERISK-25263) CDR insert failure due to reversed if logic
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Fri Jul 17 14:50:33 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-25263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226938#comment-226938 ]
Asterisk Team commented on ASTERISK-25263:
------------------------------------------
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.
A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].
> CDR insert failure due to reversed if logic
> -------------------------------------------
>
> Key: ASTERISK-25263
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25263
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: CDR/cdr_adaptive_odbc
> Affects Versions: SVN
> Environment: Slackware Linux
> Reporter: Elazar Broad
> Severity: Critical
>
> The logic in the if statement which determines whether to use quoted statements in cdr_adaptive_odbc.c is reversed, resulting in a reference to tableptr->quoted_identifiers which is null, which terminates the sql buffer resulting in a truncated SQL statement[INSERT INTO table (].
> --
> if (quoted) {
> ast_str_append(&sql, 0, "%s%s", separator, entry->name);
> } else {
> ast_str_append(&sql, 0, "%s%c%s%c", separator, tableptr->quoted_identifiers, entry->name, tableptr->quoted_identifiers);
> }
> --
> should be
> --
> if !(quoted) {
> ast_str_append(&sql, 0, "%s%s", separator, entry->name);
> } else {
> ast_str_append(&sql, 0, "%s%c%s%c", separator, tableptr->quoted_identifiers, entry->name, tableptr->quoted_identifiers);
> }
> --
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list