server/tcl_server.c: Fix buffer overrun 52/5352/2
authorJimmy <nhminus@gmail.com>
Thu, 5 Dec 2019 06:45:17 +0000 (14:45 +0800)
committerTomas Vanek <vanekt@fbl.cz>
Thu, 12 Dec 2019 14:31:42 +0000 (14:31 +0000)
commit0f12d792ed5ab2b8f934e689b8a23f8c55f1f218
tree2636e9feada70b57867a21fd79d7f768d14d29eb
parent1e427fd580ad94bb3bf29d4e02ef81361c920f28
server/tcl_server.c: Fix buffer overrun

The input buffer size is checked only after writing past its end.

Change-Id: I6a9651c5b7d82efe338468d67bf6caca41004b01
Signed-off-by: Jimmy <nhminus@gmail.com>
Reviewed-on: http://openocd.zylin.com/5352
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/server/tcl_server.c