mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 20:08:17 +00:00
AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@211569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user