[rygel] external: Safer slicing of get_children() results
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] external: Safer slicing of get_children() results
- Date: Thu, 19 Nov 2009 13:59:03 +0000 (UTC)
commit 5aaab374a64a0b586a5ab3e69dec18877534b257
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Nov 19 14:54:46 2009 +0200
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 files changed, 1 insertions(+), 1 deletions(-)
---
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]