[Libreoffice] va_start without va_end

Norbert Thiebaud nthiebaud at gmail.com
Thu Aug 4 18:47:43 PDT 2011

On Thu, Aug 4, 2011 at 3:33 AM, Caolán McNamara <caolanm at redhat.com> wrote:
> On Wed, 2011-08-03 at 23:56 +0200, Julien Nabet wrote:
>> Hello,
>> In svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx, I
>> noticed the use of va_start without va_end.
>> I read it could create undefined behaviour, so I propose this simple patch.
> ...
>> +        va_end(pArgs);
>>       }
>>   }
>> If it's ok, i can commit and push it on master.
> The va_end is tucked away hidden inside InitializeRanges_Impl in
> svl/source/items/nranges.cxx

The va_end manpage, on linux says:
"Each invocation of va_start() must be matched by a corresponding
invocation of va_end() in the _same function_"
 (emphasis is mine)
 so it's not just ugly, but also 'wrong'...


More information about the LibreOffice mailing list