mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
app_osplookup: Avoid a format truncation.
Ensure that output buffers for the osp_convert_inout function have sufficient space for additional data such as brackets and ports. ASTERISK-28804 Change-Id: Ie54c8241ff0cc653910539c2db00ff2a4869750b
This commit is contained in:
committed by
Friendly Automation
parent
6b2d945174
commit
527e4f6542
@@ -449,6 +449,7 @@
|
|||||||
#define OSP_SIZE_UUID ((unsigned int)16) /* UUID size */
|
#define OSP_SIZE_UUID ((unsigned int)16) /* UUID size */
|
||||||
#define OSP_SIZE_UUIDSTR ((unsigned int)36) /* UUID string size */
|
#define OSP_SIZE_UUIDSTR ((unsigned int)36) /* UUID string size */
|
||||||
#define OSP_SIZE_QOSSTR ((unsigned int)1024) /* QoS string buffer size */
|
#define OSP_SIZE_QOSSTR ((unsigned int)1024) /* QoS string buffer size */
|
||||||
|
#define OSP_SIZE_OUTSTR ((unsigned int)288) /* OSP out size for osp_convert_inout */
|
||||||
|
|
||||||
/* Call ID Type*/
|
/* Call ID Type*/
|
||||||
#define OSP_CALLID_UNDEF ((unsigned int)0) /* Undefined */
|
#define OSP_CALLID_UNDEF ((unsigned int)0) /* Undefined */
|
||||||
@@ -1089,8 +1090,8 @@ static int osp_validate_token(
|
|||||||
int res;
|
int res;
|
||||||
int tokenlen;
|
int tokenlen;
|
||||||
unsigned char tokenstr[OSP_SIZE_TOKSTR];
|
unsigned char tokenstr[OSP_SIZE_TOKSTR];
|
||||||
char src[OSP_SIZE_NORSTR];
|
char src[OSP_SIZE_OUTSTR];
|
||||||
char dest[OSP_SIZE_NORSTR];
|
char dest[OSP_SIZE_OUTSTR];
|
||||||
unsigned int authorised;
|
unsigned int authorised;
|
||||||
unsigned int dummy = 0;
|
unsigned int dummy = 0;
|
||||||
int error;
|
int error;
|
||||||
@@ -1518,14 +1519,14 @@ static int osp_lookup(
|
|||||||
char* tmp;
|
char* tmp;
|
||||||
unsigned int tokenlen;
|
unsigned int tokenlen;
|
||||||
char token[OSP_SIZE_TOKSTR];
|
char token[OSP_SIZE_TOKSTR];
|
||||||
char src[OSP_SIZE_NORSTR];
|
char src[OSP_SIZE_OUTSTR];
|
||||||
char dev[OSP_SIZE_NORSTR];
|
char dev[OSP_SIZE_OUTSTR];
|
||||||
char host[OSP_SIZE_NORSTR];
|
char host[OSP_SIZE_OUTSTR];
|
||||||
unsigned int i, type;
|
unsigned int i, type;
|
||||||
struct osp_callid callid;
|
struct osp_callid callid;
|
||||||
unsigned int callidnum;
|
unsigned int callidnum;
|
||||||
OSPT_CALL_ID* callids[OSP_CALLID_MAXNUM];
|
OSPT_CALL_ID* callids[OSP_CALLID_MAXNUM];
|
||||||
char dest[OSP_SIZE_NORSTR];
|
char dest[OSP_SIZE_OUTSTR];
|
||||||
const char* preferred[2] = { NULL };
|
const char* preferred[2] = { NULL };
|
||||||
unsigned int dummy = 0;
|
unsigned int dummy = 0;
|
||||||
OSPEFAILREASON reason;
|
OSPEFAILREASON reason;
|
||||||
|
Reference in New Issue
Block a user