test: do not use uninitialized memory in common flags check
Only use the amount of data that was actually read from the test file. Otherwise, there is a small risk of getting false positives, and generally reading uninitialized memory makes using automated memory error detection tools harder.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines