Public bug reported:

In Ubuntu 24.04, the libacpi0 library (version 0.2-7) no longer detects
any batteries after the introduction of the patch titled "Fix buffer
size miscalculation bug." Instead of resolving the intended issue, this
change appears to have broken battery detection functionality entirely.

Steps to Reproduce:

    Update to libacpi0 version 0.2-7 on Ubuntu 24.04.
    Use a tool or application that depends on libacpi0 to check battery status 
(e.g yacpi).

Expected Behavior:

The library should properly detect the battery and provide status
information.

Actual Behavior:

No battery is detected, and tools depending on libacpi0 fail to retrieve
battery information. After downgrading to version 0.2-5, or rebuilding
the package without the parch, the expected behavior is observed.

Technical Details:

The issue appears to be related to the following code change in the
patch:

```C
- if(read > 0) buf[read - 1] = '\0';
+ if(read > 0) buf[read] = '\0';
```

This modification seems to corrupt or mismanage buffer handling,
preventing correct detection of battery devices.

Additional Information:

    libacpi0 version: 0.2-7
    OS version: Ubuntu 24.04
    The issue did not occur in previous versions (0.2-5 or earlier).
    Testing on few devices confirms the problem is consistent.

** Affects: libacpi (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2092233

Title:
  libacpi0 0.2-7 fails to detect battery after recent patch

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libacpi/+bug/2092233/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to