[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnetlib ./ChangeLog Xsharp/Dcop/DcopRef.cs Xsha...
From: |
Deryk Robosson |
Subject: |
[dotgnu-pnet-commits] pnetlib ./ChangeLog Xsharp/Dcop/DcopRef.cs Xsha... |
Date: |
Thu, 01 Jun 2006 13:19:12 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: pnetlib
Branch:
Changes by: Deryk Robosson <address@hidden> 06/06/01 13:19:12
Modified files:
. : ChangeLog
Xsharp/Dcop : DcopRef.cs QDataStream.cs DcopFunction.cs
Xsharp : Graphics.cs Widget.cs RootWindow.cs
Log message:
Validate arguments of public methods
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/ChangeLog.diff?tr1=1.2413&tr2=1.2414&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/Xsharp/Dcop/DcopRef.cs.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/Xsharp/Dcop/QDataStream.cs.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/Xsharp/Dcop/DcopFunction.cs.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/Xsharp/Graphics.cs.diff?tr1=1.29&tr2=1.30&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/Xsharp/Widget.cs.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/Xsharp/RootWindow.cs.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: pnetlib/ChangeLog
diff -u pnetlib/ChangeLog:1.2413 pnetlib/ChangeLog:1.2414
--- pnetlib/ChangeLog:1.2413 Thu Jun 1 13:03:06 2006
+++ pnetlib/ChangeLog Thu Jun 1 13:19:11 2006
@@ -37,6 +37,10 @@
* Xsharp/XException.cs, Xsharp/Dcop/DcopException.cs: Add
SerializableAttribute.
+ * Xsharp/Dcop/DcopRef.cs, Xsharp/Dcop/QDataStream.cs,
+ Xsharp/Dcop/DcopFunction.cs, Xsharp/Graphics.cs, Xsharp/Widget.cs,
+ Xsharp/RootWindow.cs: Validate arguments of public methods.
+
2006-05-30 Deryk Robosson <address@hidden>
* System.Drawing.Win32/Win32.cs: Add MarshalAs attributes for return
Index: pnetlib/Xsharp/Dcop/DcopFunction.cs
diff -u pnetlib/Xsharp/Dcop/DcopFunction.cs:1.1
pnetlib/Xsharp/Dcop/DcopFunction.cs:1.2
--- pnetlib/Xsharp/Dcop/DcopFunction.cs:1.1 Sun May 23 14:15:42 2004
+++ pnetlib/Xsharp/Dcop/DcopFunction.cs Thu Jun 1 13:19:12 2006
@@ -39,6 +39,11 @@
string withoutReturn;
string types;
+ if(input == null)
+ {
+ throw new ArgumentNullException("input", "Argument
cannot be null");
+ }
+
spaceOffset = input.IndexOf(' ');
if(spaceOffset < 1)
{
Index: pnetlib/Xsharp/Dcop/DcopRef.cs
diff -u pnetlib/Xsharp/Dcop/DcopRef.cs:1.3 pnetlib/Xsharp/Dcop/DcopRef.cs:1.4
--- pnetlib/Xsharp/Dcop/DcopRef.cs:1.3 Thu May 11 09:36:19 2006
+++ pnetlib/Xsharp/Dcop/DcopRef.cs Thu Jun 1 13:19:12 2006
@@ -89,6 +89,11 @@
/// </param>
public DcopRef(DcopRef parent)
{
+ if(parent == null)
+ {
+ throw new ArgumentNullException("parent", "Argument
cannot be null");
+ }
+
this.app = parent.App;
this.obj = parent.Obj;
}
Index: pnetlib/Xsharp/Dcop/QDataStream.cs
diff -u pnetlib/Xsharp/Dcop/QDataStream.cs:1.5
pnetlib/Xsharp/Dcop/QDataStream.cs:1.6
--- pnetlib/Xsharp/Dcop/QDataStream.cs:1.5 Thu May 11 09:36:19 2006
+++ pnetlib/Xsharp/Dcop/QDataStream.cs Thu Jun 1 13:19:12 2006
@@ -52,6 +52,16 @@
// Factory
public static QDataStream Marshal(Stream stream, DcopFunction fun,
Object[] parameters)
{
+ if(stream == null)
+ {
+ throw new ArgumentNullException("stream", "Argument
cannot be null");
+ }
+
+ if(fun == null)
+ {
+ throw new ArgumentNullException("fun", "Argument cannot
be null");
+ }
+
QDataStream s = new QDataStream(stream);
try
{
@@ -83,6 +93,11 @@
public Object ReadObject(string objType)
{
+ if((objType == null) || (objType.Length == 0))
+ {
+ return null;
+ }
+
try
{
// Simpe types
Index: pnetlib/Xsharp/Graphics.cs
diff -u pnetlib/Xsharp/Graphics.cs:1.29 pnetlib/Xsharp/Graphics.cs:1.30
--- pnetlib/Xsharp/Graphics.cs:1.29 Thu Jun 1 13:03:06 2006
+++ pnetlib/Xsharp/Graphics.cs Thu Jun 1 13:19:12 2006
@@ -2336,7 +2336,7 @@
// Validate the image parameter.
if(image == null)
{
- throw new
ArgumentNullException("image");
+ throw new
ArgumentNullException("image", "Argument cannot be null");
}
// Bail out if the source co-ordinates are out
of range.
Index: pnetlib/Xsharp/RootWindow.cs
diff -u pnetlib/Xsharp/RootWindow.cs:1.8 pnetlib/Xsharp/RootWindow.cs:1.9
--- pnetlib/Xsharp/RootWindow.cs:1.8 Wed Feb 4 07:27:07 2004
+++ pnetlib/Xsharp/RootWindow.cs Thu Jun 1 13:19:12 2006
@@ -255,6 +255,11 @@
/// </returns>
public String GetResource(String name)
{
+ if((name == null) || (name.Length == 0))
+ {
+ return null;
+ }
+
if(resources == null)
{
return null;
Index: pnetlib/Xsharp/Widget.cs
diff -u pnetlib/Xsharp/Widget.cs:1.20 pnetlib/Xsharp/Widget.cs:1.21
--- pnetlib/Xsharp/Widget.cs:1.20 Tue Mar 14 15:40:36 2006
+++ pnetlib/Xsharp/Widget.cs Thu Jun 1 13:19:12 2006
@@ -1289,6 +1289,16 @@
/// </remarks>
public void CopyTo(Array array, int index)
{
+ if(array == null)
+ {
+ throw new
ArgumentNullException("array", "Argument cannot be null");
+ }
+
+ if(index < 0)
+ {
+ throw new
ArgumentOutOfRangeException("index");
+ }
+
Widget child = topChild;
while(child != null)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnetlib ./ChangeLog Xsharp/Dcop/DcopRef.cs Xsha...,
Deryk Robosson <=