diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-03-01 14:49:58 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-03-16 12:53:50 +0000 |
commit | d80a217f7f20c8af38f938a85dd62f1809c09709 (patch) | |
tree | 854ca1bf1735aac4421722ff3a6c4fe480b1e350 /src/gb | |
parent | e0cb0eeb3f04745cd5b17d5aa7c63ad7fea988f0 (diff) |
contrib: add script to find unterminated value_string arrays
Unterminated value_string arrays are dangerous since get_value_string() and
get_string_value() need to know where the struct ends. If the terminator is
missing, they might run through and return arbitrary memory locations.
Employ some regexes to find such unterminated value string arrays and return
nonzero if any are found.
This can be used in our jenkins build jobs to avoid committing unterminated
value_string arrays. In fact I've found one in current libosmocore:
gsm0808_bssap_names in gsm/gsm0808.c, fixed in a separate patch.
Change-Id: I2bc93ab4781487e7685cfb63091a489cd126b1a8
Diffstat (limited to 'src/gb')
0 files changed, 0 insertions, 0 deletions