[Asterisk-code-review] cdr pgsql: Fix buffer overflow calling libpq (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Thu Mar 30 16:18:14 CDT 2017
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/5365 )
Change subject: cdr_pgsql: Fix buffer overflow calling libpq
......................................................................
Patch Set 1: Code-Review-1
(4 comments)
https://gerrit.asterisk.org/#/c/5365/1/cdr/cdr_pgsql.c
File cdr/cdr_pgsql.c:
PS1, Line 438: ast_free(sql);
: ast_free(sql2);
: return -1;
escapebuf leaked here
Maybe a common exit like in the cel_pgsql.c routine. That would help ensure that everything is cleaned up. Like the ast_mutex_unlock(&pgsql_lock) that many other exit points are lacking.
PS1, Line 466: PQclear(result);
: return 0;
escapebuf leaked here
Aren't sql and sql2 leaked here too?
PS1, Line 472: ast_free(sql);
: ast_free(sql2);
: return -1;
escapebuf leaked here
PS1, Line 480: ast_free(sql);
: ast_free(sql2);
escapebuf leaked here
--
To view, visit https://gerrit.asterisk.org/5365
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaacfa1f1de7cb1e9414d121850d2d8c2888f3f48
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list