Skip to content

FROMLIST: power: supply: qcom_battmgr: fix battery chemistry strncmp … - #942

Open
tingguoc wants to merge 1 commit into
qualcomm-linux:qcom-nextfrom
tingguoc:qcom-next
Open

FROMLIST: power: supply: qcom_battmgr: fix battery chemistry strncmp …#942
tingguoc wants to merge 1 commit into
qualcomm-linux:qcom-nextfrom
tingguoc:qcom-next

Conversation

@tingguoc

@tingguoc tingguoc commented Aug 12, 2026

Copy link
Copy Markdown

…length

The battery_chemistry field is a 4-byte array without guaranteed null termination. Using BATTMGR_CHEMISTRY_LEN (4) as the strncmp length for 3-character string literals implicitly requires chemistry[3] == '\0', which may not hold. Use 3 instead to match only the significant bytes.

Link: https://lore.kernel.org/all/20260812-fix-qcom-batt-chemistry-strn-v1-1-458545e02641@oss.qualcomm.com/

CRs-Fixed: 4562260

…length

The battery_chemistry field is a 4-byte array without guaranteed null
termination. Using BATTMGR_CHEMISTRY_LEN (4) as the strncmp length for
3-character string literals implicitly requires chemistry[3] == '\0',
which may not hold. Use 3 instead to match only the significant bytes.

Link: https://lore.kernel.org/all/20260812-fix-qcom-batt-chemistry-strn-v1-1-458545e02641@oss.qualcomm.com/
Signed-off-by: Tingguo Cheng <tingguo.cheng@oss.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4562260 on any of the following entities:

Entities:

  • kernel.qli.0.0

CR: 4562260

Please ensure the CR has a change task associated with at least one of the entities for this branch.

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.

1 participant