Update SeCoE Safe String Library
Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
@@ -61,4 +61,18 @@ static inline void handle_error(char *orig_dest, rsize_t orig_dmax,
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void handle_wc_error(wchar_t *orig_dest, rsize_t orig_dmax,
|
||||
char *err_msg, errno_t err_code)
|
||||
{
|
||||
#ifdef SAFECLIB_STR_NULL_SLACK
|
||||
/* null string to eliminate partial copy */
|
||||
while (orig_dmax) { *orig_dest = L'\0'; orig_dmax--; orig_dest++; }
|
||||
#else
|
||||
*orig_dest = L'\0';
|
||||
#endif
|
||||
|
||||
invoke_safe_str_constraint_handler(err_msg, NULL, err_code);
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* __SAFE_STR_CONSTRAINT_H__ */
|
||||
|
Reference in New Issue
Block a user