[PATCH app/xfs] Revert of ac59cccf8bc1ae3d41e0608f131b5eb888f9362b

Alan Coopersmith alan.coopersmith at oracle.com
Thu Aug 23 15:07:23 PDT 2012


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 <arvind.umrao at oracle.com>
> ---
>  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 <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list