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

Commit 62d9821a authored by Ray Essick's avatar Ray Essick
Browse files

Revert "fix end-of-buffer check"

This reverts commit 7dfd00cc.

Reason for revert: going with a more complete solution
Bug: 204445255

Change-Id: I6c236e5d6f9573b934d514084ba985151762cd9d
parent 7dfd00cc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -470,10 +470,11 @@ protected:
    status_t extract(std::string *val, const char **bufferpptr, const char *bufferptrmax) {
        const char *ptr = *bufferpptr;
        while (*ptr != 0) {
            if (++ptr >= bufferptrmax) {
            if (ptr >= bufferptrmax) {
                ALOGE("%s: buffer exceeded", __func__);
                return BAD_VALUE;
            }
            ++ptr;
        }
        const size_t size = (ptr - *bufferpptr) + 1;
        *val = *bufferpptr;