aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_cut.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 21:28:06 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 21:28:06 +0000
commit5f4f6a16c6f8445c03929d005d1b54d7e33e2a0b (patch)
treef569ed2f6bd68574ed062e0071f7b162f71fe631 /funcs/func_cut.c
parent2afe39172fa21bff7deb93028e6fca050e6757e3 (diff)
Changes for 1.6.0.12v1.6.0.12
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.6.0.12@211672 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_cut.c')
-rw-r--r--funcs/func_cut.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/funcs/func_cut.c b/funcs/func_cut.c
index 231729ddf..2a4eb371e 100644
--- a/funcs/func_cut.c
+++ b/funcs/func_cut.c
@@ -89,7 +89,7 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
}
*ptrvalue++ = '\0';
sortable_keys[count2].key = ptrkey;
- sscanf(ptrvalue, "%f", &sortable_keys[count2].value);
+ sscanf(ptrvalue, "%30f", &sortable_keys[count2].value);
count2++;
}
@@ -153,15 +153,15 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
int num1 = 0, num2 = MAXRESULT;
char trashchar;
- if (sscanf(nextgroup, "%d-%d", &num1, &num2) == 2) {
+ if (sscanf(nextgroup, "%30d-%30d", &num1, &num2) == 2) {
/* range with both start and end */
- } else if (sscanf(nextgroup, "-%d", &num2) == 1) {
+ } else if (sscanf(nextgroup, "-%30d", &num2) == 1) {
/* range with end */
num1 = 0;
- } else if ((sscanf(nextgroup, "%d%c", &num1, &trashchar) == 2) && (trashchar == '-')) {
+ } else if ((sscanf(nextgroup, "%30d%1c", &num1, &trashchar) == 2) && (trashchar == '-')) {
/* range with start */
num2 = MAXRESULT;
- } else if (sscanf(nextgroup, "%d", &num1) == 1) {
+ } else if (sscanf(nextgroup, "%30d", &num1) == 1) {
/* single number */
num2 = num1;
} else {