Fix opportunities for integer overflow

This commit is contained in:
Eric Fischer
2018-01-18 12:37:15 -08:00
parent e07a4dd51b
commit d49606babf
5 changed files with 1932 additions and 16 deletions
+5 -1
View File
@@ -473,7 +473,11 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
}
}
sf.extent = (long long) extent;
if (extent <= LLONG_MAX) {
sf.extent = (long long) extent;
} else {
sf.extent = LLONG_MAX;
}
if (!prevent[P_INPUT_ORDER]) {
sf.seq = 0;