]> git.ozlabs.org Git - ppp.git/commit
pppd: Eliminate memory leak with multiple instances of a string option
authorPaul Mackerras <paulus@samba.org>
Fri, 1 Aug 2014 07:32:15 +0000 (17:32 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 1 Aug 2014 11:36:51 +0000 (21:36 +1000)
commitb94b7fbbaa0589aa6ec5fdc733aeb9ff294d2656
treedf450ed1710ee4093d5103dc210961637588faa6
parent7658e8257183f062dc01f87969c140707c7e52cb
pppd: Eliminate memory leak with multiple instances of a string option

This eliminates the memory leak which occurs when a user gives the
same string option multiple times.  Although the leak is trivial under
normal conditions, the fact that it can be triggered by the user
means that it may be of interest to attackers, so let's plug the leak.

This also means that any o_string option without OPT_STATIC set needs
to have opt->addr pointing to a pointer which starts out NULL.  That
is the case for all current uses of o_string.

Signed-off-by: Paul Mackerras <paulus@samba.org>
pppd/options.c