(no subject)



Hey all,
	Here's a bug that was picked up by an automatic NULL dereference
checker at Stanford. It was in backends/markup-tree.c (if locales is NULL
it will go to the next text and derefernce it). I believe this patch does
works but since I don't know the internals, I leave it to people here.

>>>>>>>>>>>>>>>>>>
--- markup-tree.c.~1.3.~	Wed Sep 18 19:49:07 2002
+++ markup-tree.c	Sat Nov 30 03:38:53 2002
@@ -1269,7 +1269,7 @@

       /* Find the best local schema */

-      if (locales == NULL && locales[0] == NULL)
+      if (locales == NULL || locales[0] == NULL)
         locales = fallback_locales;

       n_locales = 0;
<<<<<<<<<<<<<<<<<

Cheers,
Brian

ps - If you have any comments, please CC since I'm not on this list.
--- markup-tree.c.~1.3.~	Wed Sep 18 19:49:07 2002
+++ markup-tree.c	Sat Nov 30 03:38:53 2002
@@ -1269,7 +1269,7 @@
 
       /* Find the best local schema */
 
-      if (locales == NULL && locales[0] == NULL)
+      if (locales == NULL || locales[0] == NULL)
         locales = fallback_locales;
 
       n_locales = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]