1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

changed to use slprintf() instead of sprintf() just about

everywhere. I've implemented slprintf() as a bounds checked sprintf()
using mprotect() and a non-writeable page.

This should prevent any sprintf based security holes.
(This used to be commit 6b0c1733d2)
This commit is contained in:
Andrew Tridgell
1998-05-11 06:35:45 +00:00
parent 839e47c5a6
commit ffc88e2d26

View File

@ -329,7 +329,7 @@ static void commit_parameters(int snum)
char *v;
while ((parm = lp_next_parameter(snum, &i, 1))) {
sprintf(label, "parm_%s", make_parm_name(parm->label));
slprintf(label, sizeof(label)-1, "parm_%s", make_parm_name(parm->label));
if ((v = cgi_variable(label))) {
if (parm->flags & FLAG_HIDE) continue;
commit_parameter(snum, parm, v);