Add check for user input buffer to fix improper access. Signed-off-by: quic_anane <quic_anane@quicinc.com>