[Spice-commits] server/video-stream.cpp
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 25 08:43:15 UTC 2020
server/video-stream.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 364a1fde82f497b5c649c6a4b9dcb9ca736ed904
Author: Frediano Ziglio <freddy77 at gmail.com>
Date: Wed Jun 24 11:20:40 2020 +0100
video-stream: Better check for value from environment
Do not allow negative values from "SPICE_BIT_RATE".
Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>
Acked-by: Julien Ropé <jrope at gmail.com>
diff --git a/server/video-stream.cpp b/server/video-stream.cpp
index 5608519c..d1275661 100644
--- a/server/video-stream.cpp
+++ b/server/video-stream.cpp
@@ -629,7 +629,7 @@ static uint64_t get_initial_bit_rate(DisplayChannelClient *dcc, VideoStream *str
errno = 0;
env_bit_rate = strtod(env_bit_rate_str, NULL);
- if (errno == 0) {
+ if (errno == 0 && env_bit_rate > 0) {
bit_rate = env_bit_rate * 1024 * 1024;
} else {
spice_warning("error parsing SPICE_BIT_RATE: %s", strerror(errno));
More information about the Spice-commits
mailing list