Bug#748142: Symmetrica: Missing parameter to cause stack underflow

Michael Tautschnig mt at debian.org
Thu Apr 2 08:32:04 UTC 2015


Control: reopen 748142

Hi Jerome,

My sincere apologies for getting back to you more than 6 months late.

On 13 Sep 2014 14:10:04 +0000, Jerome Benoit wrote:
[...]
> To be frank, I am confused by your bugreport.

I'm really sorry for that! Hopefully that can be cleared up now.

> Actually there is two definition of CE2 in `macro.h':
> one is commented, the second one is not.

Yes.

> I suspect that in fact you deal with the commented one,

No, that shouldn't be the case.

> what I can hardly believe but on the other hand your description
> do not seem to readily fit with the uncommented version.
> 
> Please can you confirm ?
> May I wipe the commented version to avoid confusion of the script ?
> 
[...]

I'm afraid that doesn't solve the problem. It's really that CE2 cannot be used
with the function first. Consider its declaration:

INT first(kind,res,para_eins) OBJECTKIND kind; OP res,para_eins;

(from here: http://sources.debian.net/src/symmetrica/2.0%2Bds-3/rest.c/#L3411)

So first takes as first argument an OBJECTKIND, and then two OPs. CE2, however,
will eventually do this:

erg += (*f)(checkequal2_c,b);\

(from here:
http://sources.debian.net/src/symmetrica/2.0%2Bds-3/macro.h/?hl=819#L1835)

That is, it invokes f with 2 arguments. As f will be "first", that function will
now be invoked with only 2 arguments (of type OP), missing the first one (of
type OBJECTKIND). Consequently:

- The first argument will be of inappropriate type
- The third argument will be missing

Hope this helps to clarify,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20150402/debbc929/attachment.sig>


More information about the debian-science-maintainers mailing list