File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class Serializer {
41
41
* content.
42
42
*/
43
43
static void serialize (std::ofstream &out, const std::string &data) {
44
- ssize_t length = data.size ();
44
+ std:: uint32_t length = data.size ();
45
45
serialize (out, length); // Serialize the length of the string.
46
46
out.write (data.c_str (), length); // Serialize the string characters.
47
47
out.put (' |' ); // Add a delimiter to denote the end of the string.
@@ -81,7 +81,7 @@ class Deserializer {
81
81
* delimiter '|' is not found.
82
82
*/
83
83
static void deserialize (std::ifstream &in, std::string &data) {
84
- ssize_t length;
84
+ std:: uint32_t length;
85
85
deserialize (in, length); // Deserialize the length of the string.
86
86
87
87
if (length > 1024 * 1024 ) // Sanity check to prevent huge strings.
You can’t perform that action at this time.
0 commit comments