Changeset 403:26aafbbc1640 in freeDiameter for freeDiameter/routing_dispatch.c
- Timestamp:
- Jul 8, 2010, 2:24:19 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/routing_dispatch.c
r258 r403 269 269 if (dh 270 270 && (dh->os.len == strlen(peer->p_hdr.info.pi_diamid)) 271 && (strncasecmp(peer->p_hdr.info.pi_diamid, dh->os.data, dh->os.len) == 0)) { 271 /* Here again we use strncasecmp on UTF8 data... This should probably be changed. */ 272 && (strncasecmp(peer->p_hdr.info.pi_diamid, (char *)dh->os.data, dh->os.len) == 0)) { 272 273 /* The candidate is the Destination-Host */ 273 274 c->score += FD_SCORE_FINALDEST; … … 275 276 if (dr && peer->p_hdr.info.runtime.pir_realm 276 277 && (dr->os.len == strlen(peer->p_hdr.info.runtime.pir_realm)) 277 && (strncasecmp(peer->p_hdr.info.runtime.pir_realm, dr->os.data, dr->os.len) == 0)) { 278 /* Yet another case where we use strncasecmp on UTF8 data... Hmmm :-( */ 279 && (strncasecmp(peer->p_hdr.info.runtime.pir_realm, (char *)dr->os.data, dr->os.len) == 0)) { 278 280 /* The candidate's realm matchs the Destination-Realm */ 279 281 c->score += FD_SCORE_REALM; … … 355 357 static int process_decorated_NAI(union avp_value * un, union avp_value * dr) 356 358 { 357 int i,at_idx = 0, sep_idx = 0;359 int at_idx = 0, sep_idx = 0; 358 360 unsigned char * old_un; 359 361 TRACE_ENTRY("%p %p", un, dr); … … 365 367 /* Search the positions of the first '!' and the '@' in the string */ 366 368 nai_get_indexes(un, &sep_idx, &at_idx); 367 CHECK_PARAMS( 0 < sep_idx < at_idx < un->os.len);369 CHECK_PARAMS( (0 < sep_idx) && (sep_idx < at_idx) && (at_idx < un->os.len)); 368 370 369 371 /* Create the new User-Name value */
Note: See TracChangeset
for help on using the changeset viewer.