[CVE-2016-10713] Fix out-of-bounds access to lines in a patch accepted/tizen_6.5_base accepted/tizen_6.5_base_tool backup/patch-2.7-20220120 tizen_6.5_base accepted/tizen/6.5/base/20230714.002619 accepted/tizen/6.5/base/tool/20211027.120430 accepted/tizen/6.5/base/tool/20220530.211717 accepted/tizen/base/tool/20210324.043643 submit/tizen_6.5_base/20211026.180901 submit/tizen_6.5_base/20211027.183101 submit/tizen_6.5_base/20211027.201001 submit/tizen_6.5_base/20220526.031900 submit/tizen_base/20210317.042922 tizen_6.5.m2_release
authorJinWang An <jinwang.an@samsung.com>
Mon, 22 Feb 2021 09:47:06 +0000 (18:47 +0900)
committerJinWang An <jinwang.an@samsung.com>
Wed, 17 Mar 2021 04:22:31 +0000 (13:22 +0900)
commit583592684cdaff9c7832c669656d5614f398af01
tree966bc5726f15e6d960bf7f4962d4f1bbe8157f0e
parent1c2e21155cc6f5b4605c9f3d8a5eca0c1f2f16ff
[CVE-2016-10713] Fix out-of-bounds access to lines in a patch

This bug can trigger with malformed patches.
* src/pch.c (pch_write_line): Avoid out-of-bounds access to
p_line[line][p_len[line] - 1] when p_len[line] is 0.

Change-Id: I9e82bc52555b7de139535280fe96d1a31d196176
Signed-off-by: JinWang An <jinwang.an@samsung.com>
src/pch.c