fix security vulnerability introduced

Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>