From 3dfc0c847240ac7e12c39f4ed9c31a888949ade1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 May 1998 06:38:36 +0000 Subject: 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 ee09e9dadb69aaba5a751dd20ccc6d587d841bd6) --- source3/printing/printing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/printing') diff --git a/source3/printing/printing.c b/source3/printing/printing.c index c7db5744e2..278c54933d 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -1058,7 +1058,7 @@ int get_printqueue(int snum,int cnum,print_queue_struct **queue, standard_sub(cnum,syscmd); - sprintf(outfile,"%s/lpq.%08x",tmpdir(),str_checksum(syscmd)); + slprintf(outfile,sizeof(outfile)-1, "%s/lpq.%08x",tmpdir(),str_checksum(syscmd)); if (!lpq_cache_reset[snum] && cachetime && !stat(outfile,&sbuf)) { -- cgit