[RFC] Forcing the xinerama grid

Éric Piel E.A.B.Piel at tudelft.nl
Tue Jan 22 13:26:08 PST 2008


22/01/08 03:22, David Nusinow wrote/a écrit:
> On Sun, Jan 20, 2008 at 07:27:21PM +0100, Éric Piel wrote:
>> +    /* Find the file */
>> +    num_screens = 0;
>> +    home = getenv( "HOME" );
>> +    if( home == NULL )
>> +        return 0;
>> +    sprintf( buf, "%s/.xinerama", home );
> 
> I can't comment on the suitability of the patch as a whole, but please use
> snprintf or do some checking for buffer overflows when opening the file.

Oh, yes, thanks for noticing this. Here is an updated version of the 
patch which also corrects a bug happening when the .xinerama file is not 
present.

Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fake-xinerama.patch
Type: text/x-patch
Size: 3610 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080122/40fd0e9e/attachment.bin>


More information about the xorg mailing list