Type mismatch: va_list and char*

Bug #640051 reported by Jakub Wilk
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cuneiform for Linux
Fix Released
Undecided
Unassigned
cuneiform (Debian)
Fix Released
Unknown

Bug Description

In several functions of Kern/hdebug/__snp.c (in LDPUMA_ConsoleN, LDPUMA_StatusLine, LDPUMA_MessageBoxOk, LDPUMA_MessageBoxYesNo, LDPUMA_FPrintf1024 functions) a function expecting a char* is called with a va_list argument. On some architectures[0] such a code will not ever compile, because va_list is not a pointer; on some othera, it will lead to a crash if the code in question is ever reached.

[0] E.g. ARM with GNU EABI: https://buildd.debian.org/fetch.cgi?&pkg=cuneiform&ver=1.0.0%2Bdfsg-1&arch=armel&stamp=1284497466

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

My reading of the source seems to indicate that this variable number of arguments function is called and it calls another variable number of arguments function. Without knowing how many arguments it got. Is this even possible to do portably?

Another thing is that as far as I know, none of these functions is ever called. So commenting the contents out with #ifdef WIN32 or something seems quite reasonable.

Revision history for this message
Jakub Wilk (jwilk) wrote :

I believe that you cannot do that portably. So yes, if the code is not used, it would be nice if it were ifdef'ed.

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Now it is. Does it work for you?

Changed in cuneiform-linux:
status: New → Fix Committed
Revision history for this message
Jakub Wilk (jwilk) wrote :

Sorry for late reply.
I missed 2 more functions: SnpLog and SnpStatusLine.

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Done.

Revision history for this message
daniel (daniel-schmid-engineering) wrote : Re: [Cuneiform] [Bug 640051] Re: Type mismatch: va_list and char*

Daniel Wildermuth ist bis zum 15.Oktober 2010 nicht im Büro. In dringenden
Fällen bitte Marco Schmid(<email address hidden>) kontaktieren.

Daniel Wildermuth is out of Office until October 15th 2010. Is it urgent ?
Then please contact Marco Schmid(<email address hidden>))

Revision history for this message
daniel (daniel-schmid-engineering) wrote : Re: Re: [Cuneiform] [Bug 640051] Re: Type mismatch: va_list and char*

Daniel Wildermuth ist bis zum 15.Oktober 2010 nicht im Büro. In dringenden
Fällen bitte Marco Schmid(<email address hidden>) kontaktieren.

Daniel Wildermuth is out of Office until October 15th 2010. Is it urgent ?
Then please contact Marco Schmid(<email address hidden>))

Revision history for this message
daniel (daniel-schmid-engineering) wrote : Re: Re: Re: [Cuneiform] [Bug 640051] Re: Type mismatch: va_list and char*

Daniel Wildermuth ist bis zum 15.Oktober 2010 nicht im Büro. In dringenden
Fällen bitte Marco Schmid(<email address hidden>) kontaktieren.

Daniel Wildermuth is out of Office until October 15th 2010. Is it urgent ?
Then please contact Marco Schmid(<email address hidden>))

Changed in cuneiform (Debian):
status: Unknown → Confirmed
Changed in cuneiform-linux:
status: Fix Committed → Fix Released
Changed in cuneiform (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.