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 @@ -36,7 +36,7 @@ class Serializer {
36
36
* content.
37
37
*/
38
38
static void serialize (std::ofstream &out, const std::string &data) {
39
- ssize_t length = data.size ();
39
+ std:: uint32_t length = data.size ();
40
40
serialize (out, length); // Serialize the length of the string.
41
41
out.write (data.c_str (), length); // Serialize the string characters.
42
42
out.put (' |' ); // Add a delimiter to denote the end of the string.
@@ -76,7 +76,7 @@ class Deserializer {
76
76
* delimiter '|' is not found.
77
77
*/
78
78
static void deserialize (std::ifstream &in, std::string &data) {
79
- ssize_t length;
79
+ std:: uint32_t length;
80
80
deserialize (in, length); // Deserialize the length of the string.
81
81
82
82
if (length > 1024 * 1024 ) // Sanity check to prevent huge strings.
You can’t perform that action at this time.
0 commit comments