Summary: | ASTERISK-12790: [Patch] Fix false string allocation in realtime_pgsql_store where creating INSERT | ||
Reporter: | Navin Kumar (navkumar) | Labels: | |
Date Opened: | 2008-09-27 19:10:39 | Date Closed: | 2008-09-28 16:29:15 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_config_pgsql |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) res_config_pgsql-store.diff | |
Description: | The realtime store_func does not work properly in res_config_pgsql. When composing the INSERT statements, sizeof is used instead of strlen for newparam and newval. Both of these are of type 'const char *' and this leads to improper string allocation and editing. | ||
Comments: | By: Digium Subversion (svnbot) 2008-09-28 16:29:14 Repository: asterisk Revision: 145076 U trunk/res/res_config_pgsql.c ------------------------------------------------------------------------ r145076 | tilghman | 2008-09-28 16:29:13 -0500 (Sun, 28 Sep 2008) | 4 lines Change several improper "sizeof" to "strlen", as sizeof in that context would incorrectly use the size of a pointer, rather than the length of a string. (Closes issue ASTERISK-12790) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=145076 |