On 08/23/12 04:25 AM, Arvind Umrao wrote: > xfs service will go to maintenance status after running fsinfo. NULL is > passed to socket layer causing crash. It was missed that it also gets passed > to ReopenCOTSServer which attempts to strdup the port string without checking > if it's null. This thus appears to be broken both in our code and upstream > and the fix should be pushed back upstream as well. > > http://cgit.freedesktop.org/xorg/app/xfs/commit/?id=ac59cccf8bc1ae3d41e0608f131b5eb888f9362b > > Signed-off-by: Arvind Umrao <[email protected]> > --- > os/xfstrans.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/os/xfstrans.c b/os/xfstrans.c > index 5c07abd..81cd91f 100644 > --- a/os/xfstrans.c > +++ b/os/xfstrans.c > @@ -35,7 +35,7 @@ > OldListenRec * > TRANS(GetInetdListenInfo) (int fd) > { > - char *port = NULL; > + char *port = "0"; > XtransConnInfo inetdCI; > OldListenRec *old_listen; > int portnum;
As I explained when Arvind brought this to our internal code review: Unfortunately, I apparently missed that it also gets passed to ReopenCOTSServer which attempts to strdup the port string without checking if it's null. This thus appears to be broken both in our code and upstream and the fix should be pushed back upstream as well. +1 for this fix, since crashing is worse than compiler warning. Therefore: Reviewed-by: Alan Coopersmith <[email protected]> -- -Alan Coopersmith- [email protected] Oracle Solaris Engineering - http://blogs.oracle.com/alanc _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
