mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Merged revisions 316429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r316429 | tilghman | 2011-05-03 19:12:25 -0500 (Tue, 03 May 2011) | 7 lines Escape column names in case they contain illegal characters ('-') or reserved words. (closes issue #19063) Reported by: festr Patches: patch uploaded by festr (license 443) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -325,7 +325,7 @@ db_reconnect:
|
||||
ast_str_make_space(&escape, (valsz = strlen(value)) * 2 + 1);
|
||||
mysql_real_escape_string(&mysql, ast_str_buffer(escape), value, valsz);
|
||||
|
||||
ast_str_append(&sql1, 0, "%s", entry->name);
|
||||
ast_str_append(&sql1, 0, "`%s`", entry->name);
|
||||
ast_str_append(&sql2, 0, "'%s'", ast_str_buffer(escape));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user