Skip to content

Bound Elbert local MAC address read#270

Open
Rohithmatham12 wants to merge 1 commit into
facebook:heliumfrom
Rohithmatham12:fix-elbert-weutil-mac-read
Open

Bound Elbert local MAC address read#270
Rohithmatham12 wants to merge 1 commit into
facebook:heliumfrom
Rohithmatham12:fix-elbert-weutil-mac-read

Conversation

@Rohithmatham12

Copy link
Copy Markdown

Fixes #126.

This bounds the local MAC address read in elbert_weutil:

  • passes the destination buffer size into read_local_mac
  • initializes the fallback value with snprintf
  • limits the sysfs read to the destination buffer size
  • checks the fscanf result and preserves the "NA" fallback on malformed input

Test plan:

git diff --check

I did not run a full OpenBMC image build locally because the Yocto/OpenBMC build environment and platform layers are not configured in this workspace.

@meta-cla meta-cla Bot added the CLA Signed label Jun 10, 2026
@meta-codesync

meta-codesync Bot commented Jun 10, 2026

Copy link
Copy Markdown

This pull request has been imported. If you are a Meta employee, you can view this in D108200221. (Because this pull request was imported automatically, there will not be any future comments.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no limitation for "%s" while calling fscanf()

1 participant