Prevent out of bounds write. 81/259481/2 submit/tizen/20210615.115700
authorErnest Borowski <e.borowski@samsung.com>
Tue, 8 Jun 2021 17:27:31 +0000 (17:27 +0000)
committerErnest Borowski <e.borowski@samsung.com>
Tue, 8 Jun 2021 17:49:55 +0000 (17:49 +0000)
commit025390d53cfc516b17b52321f1bc32eb13d94b73
treee8cce9e554a2eecc53edf7c28eb4c3467c5ee756
parent93cea542f9328420a320a6953e5f6703d257431c
Prevent out of bounds write.

read() could write up to PATH_MAX chars to array
and return it as res, then we write to this array at res
position which is out of bound index.
exepath[res] = '\0';
sizeof(exepath) is equal to res, so it is out of bounds write.

Change-Id: I1c1a2f00998933e5ff7bc17409ea6a228b21475c
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
src/client-api/dumpsys-user.c