[asterisk-commits] tilghman: branch 1.6.2 r280556 - /branches/1.6.2/res/res_config_curl.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 29 16:07:08 CDT 2010
Author: tilghman
Date: Thu Jul 29 16:07:03 2010
New Revision: 280556
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=280556
Log:
Off-by-one error
(closes issue #17590)
Reported by: atis
Patches:
20100729__issue17590.diff.txt uploaded by tilghman (license 14)
Modified:
branches/1.6.2/res/res_config_curl.c
Modified: branches/1.6.2/res/res_config_curl.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/res/res_config_curl.c?view=diff&rev=280556&r1=280555&r2=280556
==============================================================================
--- branches/1.6.2/res/res_config_curl.c (original)
+++ branches/1.6.2/res/res_config_curl.c Thu Jul 29 16:07:03 2010
@@ -88,7 +88,7 @@
va_end(ap);
ast_str_append(&query, 0, ")}");
- pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize);
+ pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize - 1);
/* Remove any trailing newline characters */
if ((stringp = strchr(buffer, '\r')) || (stringp = strchr(buffer, '\n')))
@@ -170,7 +170,7 @@
ast_str_append(&query, 0, ")}");
/* Do the CURL query */
- pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize);
+ pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize - 1);
if (!(cfg = ast_config_new()))
goto exit_multi;
@@ -258,7 +258,7 @@
va_end(ap);
ast_str_append(&query, 0, ")}");
- pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize);
+ pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize - 1);
/* Line oriented output */
stringp = buffer;
@@ -321,7 +321,7 @@
ast_str_append(&query, 0, ")}");
/* TODO: Make proxies work */
- pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize);
+ pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize - 1);
/* Line oriented output */
stringp = buffer;
@@ -385,7 +385,7 @@
va_end(ap);
ast_str_append(&query, 0, ")}");
- pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize);
+ pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize - 1);
stringp = buffer;
while (*stringp <= ' ')
@@ -452,7 +452,7 @@
va_end(ap);
ast_str_append(&query, 0, ")}");
- pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize);
+ pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize - 1);
/* Line oriented output */
stringp = buffer;
@@ -511,7 +511,7 @@
va_end(ap);
ast_str_append(&query, 0, ")}");
- pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, sizeof(buffer));
+ pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, sizeof(buffer) - 1);
return atoi(buffer);
}
@@ -544,7 +544,7 @@
ast_str_set(&query, 0, "${CURL(%s/static?file=%s)}", url, buf1);
/* Do the CURL query */
- pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize);
+ pbx_substitute_variables_helper(NULL, ast_str_buffer(query), buffer, bufsize - 1);
/* Line oriented output */
stringp = buffer;
More information about the asterisk-commits
mailing list