virDomainSendKey: validate codeset argument
This argument wasn't validated anywhere, neither in the generic implementation nor in the individual drivers. As a result a call to this function with a large enough codeset value prior to this change causes libvirtd to crash. This happens because all drivers call virKeycodeValueTranslate which uses codeset as an index to the virKeymapValues array, causing an out-of-bounds error. Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
Showing
想要评论请 注册 或 登录