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

Commit dd87103c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "fix end-of-buffer check""

parents 7aa6a95f 62d9821a
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;