forked from sonic-net/sonic-swss-common
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for binary data read for Table::get() (sonic-net#836)
In the current implementation, the data from redis is passed directly to the std::string(char*) constructor which truncates the data on the null byte. To support binary data that can contain null bytes, the redis reply *str* is passed along with its *len* into the std::string(char*,size_t) constructor that supports the input size.
- Loading branch information
1 parent
8dc6218
commit 7f95d7c
Showing
2 changed files
with
30 additions
and
1 deletion.
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