Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: infinite recursion in pfc\string_base.h? (Read 1438 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

infinite recursion in pfc\string_base.h?

Code: [Select]
	template<typename t_char> int strcmp_partial_ex_t(const t_char * p_string,t_size p_string_length,const t_char * p_substring,t_size p_substring_length) throw() {
p_string_length = strlen_max_t(p_string,p_string_length); p_substring_length = strlen_max_t(p_substring,p_substring_length);
return _strcmp_partial_ex(p_string,p_string_length,p_substring,p_substring_length);
}

template<typename t_char>
int strcmp_partial_t(const t_char * p_string,const t_char * p_substring) throw() {return strcmp_partial_ex_t(p_string,~0,p_substring,~0);}

inline int strcmp_partial_ex(const char * str, t_size strLen, const char * substr, t_size substrLen) throw() {return strcmp_partial_ex(str, strLen, substr, substrLen); }
inline int strcmp_partial(const char * str, const char * substr) throw() {return strcmp_partial_t(str, substr); }
This is near the very end of string_base.h.

strcmp_partial_ex just calls itself with the same parameters.  I'm guessing it should call strcmp_partial_ex_t instead.

 

Re: infinite recursion in pfc\string_base.h?

Reply #1
Indeed it should, thanks for reporting.
Microsoft Windows: We can't script here, this is bat country.