From 5aaab374a64a0b586a5ab3e69dec18877534b257 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Thu, 19 Nov 2009 14:54:46 +0200 Subject: [PATCH] external: Safer slicing of get_children() results Reported child count could be wrong and therefore it is not safe to use that number when slicing the list of children. --- src/plugins/external/rygel-external-container.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/external/rygel-external-container.vala b/src/plugins/external/rygel-external-container.vala index 778c883..3617606 100644 --- a/src/plugins/external/rygel-external-container.vala +++ b/src/plugins/external/rygel-external-container.vala @@ -98,7 +98,7 @@ public class Rygel.ExternalContainer : Rygel.MediaContainer { } uint stop = offset + max_count; - stop = stop.clamp (0, this.child_count); + stop = stop.clamp (0, media_objects.size); return media_objects.slice ((int) offset, (int) stop); } -- 2.7.4