Skip to content

Commit

Permalink
Merge pull request #1436 from ahatstat:fix-1435-OS_GetErrorName-Seg-F…
Browse files Browse the repository at this point in the history
…aults

Fix #1435, Fix pointer error in OS_GetErrorName
  • Loading branch information
dzbaker committed Jan 18, 2024
2 parents e3e336a + 12a2624 commit 128ab23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os/shared/src/osapi-errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int32 OS_GetErrorName(int32 error_num, os_err_name_t *err_name)
if (Error->Number == error_num && Error->Name != NULL)
{
strncpy(*err_name, Error->Name, sizeof(*err_name) - 1);
*err_name[sizeof(*err_name) - 1] = 0;
(*err_name)[sizeof(*err_name) - 1] = 0;
return_code = OS_SUCCESS;
}
else
Expand Down

0 comments on commit 128ab23

Please sign in to comment.