-
Jonathan Schöbel authored
When a tag is made known to the Validator, which it already knows, the old id is returned and nothing is added. As this has to be checked by iterating over all known tags, a new helper function is written for both SH_Validator_check_tag and SH_Validator_register_tag: SH_Validator_get_tag. Because we want also to test this function, we have to include validator.c in the test file and override the static keyword by an empty macro. It isn't possible any more to check for correct overflowdetection by setting the index to UINT_MAX, because it will be iterated over all data, thus raising an SIGSEGV when doing so. This is solved by filling garbage unil UINT_MAX is really reached. As there would be an timeout and it would fill RAM with around 40 GB of garbage, UINT_MAX is overriden prior to inclusion of validator.c .
Jonathan Schöbel authoredWhen a tag is made known to the Validator, which it already knows, the old id is returned and nothing is added. As this has to be checked by iterating over all known tags, a new helper function is written for both SH_Validator_check_tag and SH_Validator_register_tag: SH_Validator_get_tag. Because we want also to test this function, we have to include validator.c in the test file and override the static keyword by an empty macro. It isn't possible any more to check for correct overflowdetection by setting the index to UINT_MAX, because it will be iterated over all data, thus raising an SIGSEGV when doing so. This is solved by filling garbage unil UINT_MAX is really reached. As there would be an timeout and it would fill RAM with around 40 GB of garbage, UINT_MAX is overriden prior to inclusion of validator.c .