uniconproject / unicon

http://www.unicon.org
Other
54 stars 28 forks source link

runtime: fix buffer overflow with wildcard shell expansion in open() #429

Closed Jafaral closed 4 weeks ago

Jafaral commented 4 weeks ago

I think the condition should still be strlen(fnamestr) < MaxPath, since fnamestr is assumed to be a path, that is why I added that test. I did allocate the 3 * MaxPath buffer to account for 2*strlen(fnamestr) plus some extra room for the shell script. For any MaxPath>58 the buffer will not overflow, but I can but be explicit there and be exact.