Author: bnickel
Date: 2006-08-28 22:48:25 -0400 (Mon, 28 Aug 2006)
New Revision: 64505
Modified:
trunk/taglib-sharp/ChangeLog
trunk/taglib-sharp/src/TagLib/Asf/Tag.cs
Log:
Fixed up the reading of WM/PartOfSet to avoid crashes.
Modified: trunk/taglib-sharp/ChangeLog
===================================================================
--- trunk/taglib-sharp/ChangeLog 2006-08-29 02:12:43 UTC (rev 64504)
+++ trunk/taglib-sharp/ChangeLog 2006-08-29 02:48:25 UTC (rev 64505)
@@ -1,3 +1,8 @@
+2006-08-28 Brian Nickel <[EMAIL PROTECTED]>
+
+ * src/TagLib/Asf/Tag.cs: Fixes a segmentation fault that can arise from
+ TagLib.Asf.Tag.DiscCount when WM/PartOfSet doesn't contain a '/'.
+
2006-08-27 Aaron Bockover <[EMAIL PROTECTED]>
* src/TagLib/ReadOnlyException.cs: New exception
Modified: trunk/taglib-sharp/src/TagLib/Asf/Tag.cs
===================================================================
--- trunk/taglib-sharp/src/TagLib/Asf/Tag.cs 2006-08-29 02:12:43 UTC (rev
64504)
+++ trunk/taglib-sharp/src/TagLib/Asf/Tag.cs 2006-08-29 02:48:25 UTC (rev
64505)
@@ -213,11 +213,14 @@
get
{
string value = GetDescriptorString ("WM/PartOfSet");
- try
- {
- return UInt32.Parse (value.Split (new char [] {'/'}) [1]);
- }
- catch {return 0;}
+ if (value != null && value.IndexOf ('/') != -1)
+ try
+ {
+ return UInt32.Parse (value.Split (new char [] {'/'}) [1]);
+ }
+ catch {}
+
+ return 0;
}
set
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches