Florian Weik
2015-Sep-02 12:09 UTC
[Patch] Fix NAME variable in subnet-* scripts for local subnets.
Hi, attached is a patch that fixes that the NAME variable in subnet-up/down scripts for local subnets is not set. The reason for this was that there was a "hole" in the envp array in src/subnet.c:subnet_update(). If the subnet was local, envp[6] was NULL and the evaluation stoped there. Actually, the name string was leaking. This is easily fixed by changing the order in the array. I wasn't sure if the github repo linked on the webpage is still used, since there seems to be little activity. So again as Email, please correct me if this is not the right way to submit a patch. Cheers, Florian -- Florian Weik florianweik at gmail.com ++49 157 85939252 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20150902/a01e00c2/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: subnet_up_name.patch Type: text/x-patch Size: 2115 bytes Desc: not available URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20150902/a01e00c2/attachment.bin>
Guus Sliepen
2015-Sep-02 12:58 UTC
[Patch] Fix NAME variable in subnet-* scripts for local subnets.
On Wed, Sep 02, 2015 at 02:09:46PM +0200, Florian Weik wrote:> attached is a patch that fixes that the NAME variable in subnet-up/down > scripts for local subnets is not set. The reason for this was that there > was a "hole" in the envp array in src/subnet.c:subnet_update(). If the > subnet was local, envp[6] was NULL and the evaluation stoped there. > Actually, the name string was leaking. This is easily fixed by changing the > order in the array.Indeed. Thanks for the patch!> I wasn't sure if the github repo linked on the webpage is still used, since > there seems to be little activity. So again as Email, please correct me if > this is not the right way to submit a patch.Both ways are perfectly fine; it's just that I hadn't come around to looking at your pull request yet. -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20150902/06c59893/attachment.sig>