Changeset 2726 for pjproject/trunk
- Timestamp:
- May 30, 2009 10:17:55 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r2597 r2726 23 23 #include <pjlib-util/base64.h> 24 24 #include <pj/assert.h> 25 #include <pj/ctype.h> 25 26 #include <pj/lock.h> 26 27 #include <pj/log.h> … … 981 982 pj_str_t input; 982 983 char *token; 984 int token_len; 983 985 pj_str_t tmp; 984 986 pj_status_t status; … … 994 996 return PJMEDIA_SDP_EINATTR; 995 997 } 998 token_len = pj_ansi_strlen(token); 999 1000 /* Tag must not use leading zeroes. */ 1001 if (token_len > 1 && *token == '0') 1002 return PJMEDIA_SDP_EINATTR; 1003 1004 /* Tag must be decimal, i.e: contains only digit '0'-'9'. */ 1005 for (itmp = 0; itmp < token_len; ++itmp) 1006 if (!pj_isdigit(token[itmp])) 1007 return PJMEDIA_SDP_EINATTR; 1008 1009 /* Get tag value. */ 996 1010 *tag = atoi(token); 997 if (*tag == 0)998 return PJMEDIA_SDP_EINATTR;999 1011 1000 1012 /* Crypto-suite */
Note: See TracChangeset
for help on using the changeset viewer.