|
Lines 569-575
Link Here
|
| 569 |
* Check for a name on the mangled name stack |
569 |
* Check for a name on the mangled name stack |
| 570 |
* |
570 |
* |
| 571 |
* Input: s - Input *and* output string buffer. |
571 |
* Input: s - Input *and* output string buffer. |
| 572 |
* |
572 |
* maxlen - space in i/o string buffer. |
| 573 |
* Output: True if the name was found in the cache, else False. |
573 |
* Output: True if the name was found in the cache, else False. |
| 574 |
* |
574 |
* |
| 575 |
* Notes: If a reverse map is found, the function will overwrite the string |
575 |
* Notes: If a reverse map is found, the function will overwrite the string |
|
Lines 580-586
Link Here
|
| 580 |
* ************************************************************************** ** |
580 |
* ************************************************************************** ** |
| 581 |
*/ |
581 |
*/ |
| 582 |
|
582 |
|
| 583 |
static BOOL check_cache( char *s ) |
583 |
static BOOL check_cache( char *s, size_t maxlen ) |
| 584 |
{ |
584 |
{ |
| 585 |
ubi_cacheEntryPtr FoundPtr; |
585 |
ubi_cacheEntryPtr FoundPtr; |
| 586 |
char *ext_start = NULL; |
586 |
char *ext_start = NULL; |
|
Lines 614-620
Link Here
|
| 614 |
if( !FoundPtr ) { |
614 |
if( !FoundPtr ) { |
| 615 |
if(saved_ext) { |
615 |
if(saved_ext) { |
| 616 |
/* Replace the saved_ext as it was truncated. */ |
616 |
/* Replace the saved_ext as it was truncated. */ |
| 617 |
(void)pstrcat( s, saved_ext ); |
617 |
(void)safe_strcat( s, saved_ext, maxlen ); |
| 618 |
SAFE_FREE(saved_ext); |
618 |
SAFE_FREE(saved_ext); |
| 619 |
} |
619 |
} |
| 620 |
return( False ); |
620 |
return( False ); |
|
Lines 624-633
Link Here
|
| 624 |
found_name = (char *)(FoundPtr + 1); |
624 |
found_name = (char *)(FoundPtr + 1); |
| 625 |
found_name += (strlen( found_name ) + 1); |
625 |
found_name += (strlen( found_name ) + 1); |
| 626 |
|
626 |
|
| 627 |
(void)pstrcpy( s, found_name ); |
627 |
(void)safe_strcpy( s, found_name, maxlen ); |
| 628 |
if( saved_ext ) { |
628 |
if( saved_ext ) { |
| 629 |
/* Replace the saved_ext as it was truncated. */ |
629 |
/* Replace the saved_ext as it was truncated. */ |
| 630 |
(void)pstrcat( s, saved_ext ); |
630 |
(void)safe_strcat( s, saved_ext, maxlen ); |
| 631 |
SAFE_FREE(saved_ext); |
631 |
SAFE_FREE(saved_ext); |
| 632 |
} |
632 |
} |
| 633 |
|
633 |
|