Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 651d0a57 authored by Phil Burk's avatar Phil Burk
Browse files

audioflinger: fix NUL terminator in dumpsys

Bug: 155096545
Test: adb shell dumpsys media.audio_flinger | more
Test: then search for "Device"
Test: There should be no garbage characters on the next line.
Change-Id: I798d914cede3f45151f97178de3ceee09b4e24c0
parent 05be7e51
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -144,7 +144,8 @@ void AudioFlinger::DeviceEffectManager::dump(int fd) {
        write(fd, result.string(), result.size());
    }

    write(fd, "\nDevice Effects:\n", sizeof("\nDevice Effects:\n"));
    String8 heading("\nDevice Effects:\n");
    write(fd, heading.string(), heading.size());
    for (const auto& iter : mDeviceEffects) {
        String8 outStr;
        outStr.appendFormat("%*sEffect for device %s address %s:\n", 2, "",