libxtables: Avoid buffer overrun in xtables_compatible_revision() 20/256220/1 accepted/tizen_6.5_base accepted/tizen_7.0_base accepted/tizen_7.0_base_hotfix accepted/tizen_unified tizen tizen_6.5_base tizen_7.0_base tizen_7.0_base_hotfix accepted/tizen/6.5/base/20211028.060000 accepted/tizen/7.0/base/20221116.025811 accepted/tizen/7.0/base/hotfix/20221116.055219 accepted/tizen/base/20210823.102850 accepted/tizen/base/20221115.103648 accepted/tizen/unified/20210402.091034 submit/tizen/20210331.081527 submit/tizen/20210823.081025 submit/tizen_6.5_base/20211028.134101 submit/tizen_base/20210823.081241 tizen_6.5.m2_release tizen_7.0_m2_release
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 31 Mar 2021 05:05:46 +0000 (14:05 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 31 Mar 2021 05:05:52 +0000 (14:05 +0900)
commit8f18eb6b2230d2c7968fad3d62d966b54e1d434b
tree7601ca298bcbc69affe9b3b9b8046929ded20b4d
parentb535374131220ea8178ef3423f0737829aee4296
libxtables: Avoid buffer overrun in xtables_compatible_revision()

The function is exported and accepts arbitrary strings as input. Calling
strcpy() without length checks is not OK.

Backport commit:
https://git.netfilter.org/iptables/commit/?id=f7d3dbb82e7ed94ccbf10cf70a3c7b3f3aaef1a1

Change-Id: Ibe4d0957fd6d9dd284ac3f84a328ea7b85e32b6b
libxtables/xtables.c