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

Re: wheezy/lts - segfault in xrdp after upgrade to 0.5.0-2+deb7u2



Hi!

Frank Richter wrote:

> --- a/sesman/libscp/libscp_v0.c	2017-12-12 14:07:58.000000000 +0100
> +++ b/sesman/libscp/libscp_v0.c	2017-12-12 14:09:16.000000000 +0100
> @@ -203,7 +203,7 @@
>
>      /* reading username */
>      in_uint16_be(c->in_s, sz);
> -    buf[sz]=g_new0(char, sz);
> +    buf=g_new0(char, sz);
                        ↑
>      in_uint8a(c->in_s, buf, sz);
>  	buf[sz] = '\0';
            ↑

>      if (0 != scp_session_set_username(session, buf))

There’s unfortunately still a problem, which I pointed out
by the above arrows. Dominik and me fixed this in unstable
after I’ve discovered it, and he’s also reported this to
upstream since they shipped the broken patch, but as the
LTS version also includes it (backported), you’ll likely
wish to fix that; the segfault looks similar.

Basically, *all* those g_new0() calls that were introduced
need to be changed to 「g_new0(char, sz + 1)」 because they
*all* are followed by 「buf[sz] = '\0';」.

HTH & HAND & thanks for LTS,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg


Reply to: