-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: JsonStringUtil attempts to serialize bad char* in error message (#…
…12027) Summary: Pull Request resolved: #12027 JsonStringUtil uses VELOX_USER_CHECK_NE/VELOX_USER_CHECK_LE to compare char* to make sure one is not at or beyond the end of the string. The way the macro works, if it fails, it will attempt to serialize the char* in the error message. It doesn't not serialize the address but rather a string starting from the pointer (since it's a char*). Given this check has already determined the pointer is at or beyond the end of the string this produces results that are useless at best. Using VELOX_USER_CHECK avoids this serialization. Caught via ASAN with expression fuzzer tests. Reviewed By: kgpai Differential Revision: D67875678 fbshipit-source-id: a383aca300a5c2fe34f6d4169bfe0a5b98aff0bc
- Loading branch information
1 parent
b926bdf
commit b92e4bd
Showing
2 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters