|
|
|
|
|
by dingaling911
33 days ago
|
|
He means the string value of the variable admin_id, not the variable name admin_id. And the bug comes from the temporary string object created when he passes in the string to Sanitize. Sanitize("foobarbaz") -> creates temporary string -> string_view from temporary string -> returns string_view of temporary string temporary string destructed operations on returned string_view -> oops, use after free.q |
|
And the while loop shouldn't even run at all since front() never equals ' '.