Fix a segfault reported by Etienne Renault using dve2check.

* src/misc/intvcmp2.cc (stream_compression_base::run): Fix a case
where the "id" of the compression to use would be miscalculated,
causing wrong values to be encoded.
* src/tgbatest/intvcmp2.cc: Add this particular test case.
This commit is contained in:
Alexandre Duret-Lutz 2012-01-24 19:09:07 +01:00
parent 4b5734d8ec
commit 547715463a
3 changed files with 26 additions and 12 deletions

View file

@ -127,5 +127,8 @@ int main()
0, 0, 0, 0, 0, 0, 0, 0, 9 };
errors += check(comp10, sizeof(comp10) / sizeof(*comp10));
int comp11[] = { 2, 254, 254, 0, 1, 4, 0, 0, 0, 1, 0, 1, 253, 0 };
errors += check(comp11, sizeof(comp11) / sizeof(*comp11));
return errors;
}