virDomainSendKey: validate codeset argument
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: Ilias Stamatis <3ef66acc2700f2eb6746a592b321628ebd41accf@gmail.com>
Reviewed-by: Erik Skultety <2c14d38fa47c8799f1b9c16280abe27f8edfec6e@redhat.com>

olafhering/libvirt,libvirt/libvirt,eskultety/libvirt,zippy2/libvirt,zippy2/libvirt,fabianfreyer/libvirt,eskultety/libvirt,zippy2/libvirt,jardasgit/libvirt,jfehlig/libvirt,eskultety/libvirt,olafhering/libvirt,andreabolognani/libvirt,libvirt/libvirt,eskultety/libvirt,nertpinx/libvirt,crobinso/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,nertpinx/libvirt,jardasgit/libvirt,olafhering/libvirt,andreabolognani/libvirt,crobinso/libvirt,jardasgit/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,libvirt/libvirt,libvirt/libvirt,nertpinx/libvirt,zippy2/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,eskultety/libvirt,nertpinx/libvirt,nertpinx/libvirt,jfehlig/libvirt,jardasgit/libvirt,crobinso/libvirt,crobinso/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,olafhering/libvirt,fabianfreyer/libvirt