[Mono-devel-list] [PATCH] Fix null reference exceptions in System.Data.DataView
tsureshkumar
tsureshkumar at novell.com
Wed Jul 6 08:09:20 EDT 2005
Marc Haisenko wrote:
> Hi folks,
> I just noticed that a bug in DataView.cs is still/again present in the current
> revision (r46988, svn://svn.myrealbox.com/source/trunk/mcs/)
>
> The problem is that a variable, rowCache, is often set to null but no null
> checks are done. That way a fresh instance of DataView throws a
> NullReferenceException e.g. when reading the Count property as it simply does
> "return rowCache.Length;".
>
> The fix is to never set the variable to null but to an empty array. The
> attached patch implements this fix (only three lines need that fix). I
> already sent a patch to fix the very same bug on 11.11.2004, it seems like it
> never got included...
FYI, the patch had been in earlier. See the changelog
[Snip]
2004-12-01 Miguel de Icaza <miguel at ximian.com>
* DataView.cs: Patch from Marc Haisenko that ensures that rowCache
is never null.
[/Snip]
somehow, due to some other fixes/re-org/cleanup the patch went cleaned
up :-(.
>
> C'ya,
> Marc
>
>
Thanks,
suresh.
More information about the Mono-devel-list
mailing list