]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virDomainAudioCommonParse: Use virXMLProp*
authorTim Wiederhake <twiederh@redhat.com>
Tue, 27 Apr 2021 15:04:33 +0000 (17:04 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 6 May 2021 10:34:41 +0000 (12:34 +0200)
commit38180f87f5bbe5b7b5a31ecece20ff44e479bcf6
treeaa370ce34c3d6bbaca4af715df0aa2e4339e0e06
parentc9876ccf5646ce46bd25d107c95ebd26ce4bf29c
virDomainAudioCommonParse: Use virXMLProp*

This strictens the parser to disallow negative values (interpreted as
`UINT_MAX + value + 1`) for attributes `voices` (typically 1),
`bufferLength` (measured in milliseconds), `frequency` (in Hz, typically
44100), and `channels` (typically 2 for stereo).

None of these properties benefit from or have a sensible use-case for
wrap-around behavior.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c