Re: [PATCH] power: supply: qcom_battmgr: fix battery chemistry strncmp length
Sebastian Reichel <[email protected]>
| Newsgroups | org.kernel.vger.linux-pm,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <178657343050.347615.7967420952689531445.b4-ty@b4> |
On Wed, 12 Aug 2026 00:44:47 -0700, Tingguo Cheng wrote:
> 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.
Applied, thanks!
[1/1] power: supply: qcom_battmgr: fix battery chemistry strncmp length
commit: 37689bcbc41b3850781b6c84f90cb4bd632bfbf0
Best regards,
--
Sebastian Reichel <[email protected]>