X2Go Bug report logs - #776
nx-X11: Size of pointer 'server_support' used instead of size of its data

version graph

Package: nx-libs; Maintainer for nx-libs is X2Go Developers <x2go-dev@lists.x2go.org>;

Reported by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Date: Fri, 30 Jan 2015 19:35:02 UTC

Severity: normal

Tags: not-a-bug, pending

Found in version head

Fixed in version 2:3.5.0.29

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Full log


🔗 View this message in rfc822 format

MIME-Version: 1.0
X-Mailer: MIME-tools 5.502 (Entity 5.502)
X-Loop: owner@bugs.x2go.org
From: owner@bugs.x2go.org (X2Go Bug Tracking System)
Subject: Bug#776 closed by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
 (fix for #776 reverted)
Message-ID: <handler.776.b776.142354206124510.notifdone@bugs.x2go.org>
References: <20150210042052.Horde.5w69O56G84gsf9wlj0YaNw3@mail.das-netzwerkteam.de>
X-X2go-PR-Keywords: not-a-bug pending
X-X2go-PR-Message: they-closed 776
X-X2go-PR-Package: nx-libs
Date: Tue, 10 Feb 2015 04:25:02 +0000
Content-Type: multipart/mixed; boundary="----------=_1423542302-25442-0"
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your Bug report
which was filed against the nx-libs package:

#776: nx-X11: Size of pointer 'server_support' used instead of size of its data

It has been closed by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Mike Gabriel <mike.gabriel@das-netzwerkteam.de> by
replying to this email.


-- 
776: http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=776
X2Go Bug Tracking System
Contact owner@bugs.x2go.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: 776@bugs.x2go.org
Cc: 776-submitter@bugs.x2go.org
Subject: fix for #776 reverted
Date: Tue, 10 Feb 2015 04:20:52 +0000
[Message part 3 (text/plain, inline)]
Control: tag -1 not-a-bug
Control: close -1


Hi Heinrich,

yesterday, I reverted the fix for #776 because while applying all the  
NX patches in preparation of the 3.6.x branch of nx-libs [1], I  
realized that the file in question (glxextensions.c) never gets used  
at build time.


Greets,
Mike

[1] https://github.com/ArcticaProject/nx-libs
-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
[Message part 4 (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: submit@bugs.x2go.org
Subject: nx-X11: Size of pointer 'server_support' used instead of size of its data
Date: Fri, 30 Jan 2015 20:29:51 +0100
package: nx-libs
version: head


In nx-libs/nx-X11/extras/Mesa/src/glx/x11/glxextensions.c
the length of the zeroed memory is the length of the pointer (4 bytes in
case of a 32bit system) not the length of the data the pointer points to
(8 byte).

static void
__glXProcessServerString( const struct extension_info * ext,
			  const char * server_string,
			  unsigned char * server_support )
{
   unsigned  base;
   unsigned  len;

   (void) memset( server_support, 0, sizeof( server_support ) );

Furthermore the length of the memory area pointed to by server_support
is defined in varying ways in the coding:

#define __GL_EXT_BYTES   ((__NUM_GL_EXTS + 7) / 8)


unsigned char server_support[ __GL_EXT_BYTES ];
unsigned char server_support[8];

Currently __NUM_GL_EXTS = 123, so __GL_EXT_BYTES = 8.

What is expected to happen if __GL_EXT_BYTES > 8 after defining six more
values in the unamed (sic!) enum with the different bits?

This questionable code was identified with cppcheck.
http://cppcheck.sourceforge.net/

Best regards

Heinrich Schuchardt

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Fri Apr 19 17:19:07 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.