Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
remove throw() from strnlen due to decl from system header. replace w…
Browse files Browse the repository at this point in the history
…ith PAL_strnlen
  • Loading branch information
choikwa committed Sep 7, 2016
1 parent 14f441f commit 70f9195
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pal/inc/mbusafecrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extern WCHAR* wcstok_s( WCHAR* inString, const WCHAR* inControl, WCHAR** ioConte

// strnlen is not required unless the source string is completely untrusted (e.g. anonymous input on a website)
#ifndef SUPPRESS_STRNLEN
extern size_t strnlen( const char* inString, size_t inMaxSize );
extern size_t PAL_strnlen( const char* inString, size_t inMaxSize );
extern size_t wcsnlen( const WCHAR* inString, size_t inMaxSize );
#endif

Expand Down
1 change: 1 addition & 0 deletions src/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -6953,4 +6953,5 @@ class NativeExceptionHolderFactory
}
#endif

#define strnlen PAL_strnlen

This comment has been minimized.

Copy link
@janvorli

janvorli Sep 7, 2016

Member

A nit - could you please move this line to the place where we have all the others like this? The block starts at line 5713.

#endif // __PAL_H__
1 change: 0 additions & 1 deletion src/pal/src/include/pal/palinternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ function_name() to call the system's implementation
#define memmove DUMMY_memmove
#define memchr DUMMY_memchr
#define strlen DUMMY_strlen
#define strnlen DUMMY_strnlen
#define stricmp DUMMY_stricmp
#define strstr DUMMY_strstr
#define strcmp DUMMY_strcmp
Expand Down
2 changes: 1 addition & 1 deletion src/pal/src/safecrt/strlen_s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*
*******************************************************************************/

size_t __cdecl strnlen(const char *str, size_t maxsize) throw()
size_t __cdecl PAL_strnlen(const char *str, size_t maxsize)
{
size_t n;

Expand Down

0 comments on commit 70f9195

Please sign in to comment.