diff options
author | Dr. Lars Völker <lars.voelker@technica-engineering.de> | 2022-01-02 23:09:37 +0100 |
---|---|---|
committer | A Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2022-01-03 08:45:17 +0000 |
commit | eeb45372fa05fc4021974e1ca71710769bedfd83 (patch) | |
tree | 28b45cbe97b5d223a3ba82b8ae80542c0fc09271 /epan/uat_load.l | |
parent | 1f73e8e6a1b8dbaffd795c44cf160fcf50936977 (diff) |
UAT: Fix Wireshark crash on missing UAT columns
Wireshark crashes when missing an UAT column due to a read access
violation. This was introduced by the code to add better compatibility
to UAT changes.
See "UAT: Allow missing fields."
This codes add a check, if the defaults are NULL before accessing them.
Diffstat (limited to 'epan/uat_load.l')
-rw-r--r-- | epan/uat_load.l | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/uat_load.l b/epan/uat_load.l index b6a7ddb088..c9d0bcfe5e 100644 --- a/epan/uat_load.l +++ b/epan/uat_load.l @@ -308,6 +308,9 @@ comment #[^\n]*\n guint save_colnum = yyextra->colnum; yyextra->colnum++; while (yyextra->colnum < yyextra->uat->ncols) { + if (!yyextra->uat->default_values) { + break; + } const char *default_value = yyextra->uat->default_values[yyextra->colnum]; if (!default_value) { break; |