Skip to content

Commit

Permalink
fix encrypted String size()
Browse files Browse the repository at this point in the history
  • Loading branch information
kiyoto-suzuki committed Dec 19, 2016
1 parent 401bc45 commit 0e05308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/flatbuffers/flatbuffers.h
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ class Xxtea {
if (v != nullptr) {
out->resize(v->size() + FLATBUFFERS_ENCRYPTION_XXTEA_ALIGNMENT + PaddingBytes(v->size(), FLATBUFFERS_ENCRYPTION_XXTEA_ALIGNMENT));
size_t out_len = xxtea_ubyte_decrypt(reinterpret_cast<const uint8_t *>(v->Data()), v->size(), (uint8_t *)out->data(), out->size(), KeyArray());
out->resize(out_len);
out->resize(out_len - 1);
}
return out;
}
Expand Down

0 comments on commit 0e05308

Please sign in to comment.