Re: [OpenWrt-Devel] [PATCH] [netifd] vlan: Array out of bounds in snprintf for vlans

2018-01-31 Thread Daniel F. Dickinson
On 31/01/18 06:20 AM, Paul Oranje wrote: Why use a hard coded value 4 in "snprintf(devnum, 4, "%d", vldev->id);" ? Paul Max value for a VLAN id is 4095 = 4 digits, although probably better would be to accept full length for int and truncate in the next line. That and this was a quick hack to

Re: [OpenWrt-Devel] [PATCH] [netifd] vlan: Array out of bounds in snprintf for vlans

2018-01-31 Thread Paul Oranje
Why use a hard coded value 4 in "snprintf(devnum, 4, "%d", vldev->id);" ? Paul > Op 30 jan. 2018, om 19:16 heeft csho...@thecshore.com het volgende geschreven: > > From: "Daniel F. Dickinson" > > Detected during a side project. Not a brilliant fix, but it > gets the job done for now. *very* l