Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove incorrect use of sizeof() #137

Merged
merged 1 commit into from
Jul 3, 2023
Merged

Remove incorrect use of sizeof() #137

merged 1 commit into from
Jul 3, 2023

Conversation

gustavosr8
Copy link
Contributor

Solve memory issues #125 by correcting the use of the memset function and by changing sizeof(hpm_page) by PAYLOAD_HPM_PAGE_SIZE.

@gustavosr8 gustavosr8 self-assigned this May 17, 2023
@gustavosr8 gustavosr8 changed the base branch from master to devel May 17, 2023 17:38
@augustofg augustofg changed the title Solve memory issues Remove incorrect use of sizeof() May 17, 2023
@gustavosr8 gustavosr8 linked an issue May 29, 2023 that may be closed by this pull request
@gustavosr8 gustavosr8 force-pushed the solve-memory-issues branch from c21a5a3 to aeffe67 Compare July 3, 2023 16:32
@@ -80,7 +80,7 @@ IPMI_HANDLER(ipmi_oem_cmd_i2c_transfer, NETFN_CUSTOM_OEM, IPMI_OEM_CMD_I2C_TRANS

if ( read_len > 0 ) {
read_data = pvPortMalloc( read_len );
memset( read_data, read_len, 0 );
memset( read_data, 0, read_len );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should apply this fix to other targets (afcv-bpm and afc-v4)

@gustavosr8 gustavosr8 force-pushed the solve-memory-issues branch 3 times, most recently from 70cfe8d to fcc3894 Compare July 3, 2023 17:21
@augustofg
Copy link
Member

Ok, I would improve the commit message to reflect the changes:

Fix incorrect usage of sizeof() and memset()

@gustavosr8 gustavosr8 force-pushed the solve-memory-issues branch from fcc3894 to df3d33f Compare July 3, 2023 17:44
@gustavosr8 gustavosr8 requested a review from augustofg July 3, 2023 17:48
Copy link
Member

@augustofg augustofg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@augustofg augustofg merged commit d7f541d into devel Jul 3, 2023
@augustofg augustofg deleted the solve-memory-issues branch July 3, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory issues caused by erroneous sizeof usage and others
2 participants