rsaenh: Avoid double 'va_end(args)' in case of a premature loop termination.

Dmitry Timoshkov dmitry at baikal.ru
Wed Jun 21 22:40:44 CDT 2017


Sebastian Lackner <sebastian at fds-team.de> wrote:

> > diff --git a/dlls/rsaenh/mpi.c b/dlls/rsaenh/mpi.c
> > index 03e31023e6..dcf6ddf112 100644
> > --- a/dlls/rsaenh/mpi.c
> > +++ b/dlls/rsaenh/mpi.c
> > @@ -2365,10 +2365,7 @@ int mp_init_multi(mp_int *mp, ...)
> >                 succeeded in init-ing, then return error.
> >              */
> >              va_list clean_args;
> > -            
> > -            /* end the current list */
> > -            va_end(args);
> > -            
> > +
> >              /* now start cleaning up */            
> >              cur_arg = mp;
> >              va_start(clean_args, mp);
> > @@ -2381,6 +2378,7 @@ int mp_init_multi(mp_int *mp, ...)
> >              break;
> >          }
> >          n++;
> > +        va_end(args);
> 
> Doesn't this change make it even worse? Whats the purpose of calling va_end()
> when the enumeration isn't finished yet?

Do you have a suggestion for a better fix?

-- 
Dmitry.



More information about the wine-devel mailing list