Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 19013 Details for
Bug 22256
net-www/mod_gzip
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
diff (text/plain), 1.38 KB, created by
Gerardo Di Giacomo
on 2003-10-09 10:04:48 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Gerardo Di Giacomo
Created:
2003-10-09 10:04:48 UTC
Size:
1.38 KB
patch
obsolete
>--- mod_gzip_debug.c 2002-10-01 09:29:49.000000000 +0200 >+++ mod_gzip_debug.patch 2003-10-09 18:55:41.000000000 +0200 >@@ -94,6 +94,7 @@ > #include "httpd.h" > #include "http_config.h" > #include "http_log.h" >+#include <stdlib.h> > > #include "mod_gzip.h" > #include "mod_gzip_debug.h" >@@ -125,7 +126,7 @@ void mod_gzip_printf( const char *fmt, . > > va_start( ap, fmt ); > >- l = vsprintf( log_line, fmt, ap ); >+ l = vsnprintf( log_line, sizeof(log_line), "%s", fmt, ap ); > > va_end(ap); > >@@ -138,6 +139,8 @@ void mod_gzip_printf( const char *fmt, . > > void mod_gzip_printf( const char *fmt, ... ) > { >+ long rndNum; >+ time_t seed = time(NULL); > int l; > char *p1; > FILE *log; >@@ -153,10 +156,15 @@ void mod_gzip_printf( const char *fmt, . > long pid = (long) getpid(); > #endif > >+ srand(seed); >+ >+ rndNum = 1+ (int)(1000.0*rand()/(RAND_MAX+1.0)); >+ rndNum *= pid; >+ > #ifdef WIN32 >- sprintf( logname, "c:\\temp\\t%ld.log",(long)pid); >+ snprintf( logname, sizeof(logname), "c:\\temp\\t%ld.log",rndNum); > #else >- sprintf( logname, "/tmp/t%ld.log",(long)pid); >+ snprintf( logname, sizeof(logname), "/tmp/t%ld.log",rndNum); > #endif > > log = fopen( logname,"a" ); >@@ -168,7 +176,7 @@ void mod_gzip_printf( const char *fmt, . > > va_start( ap, fmt ); > >- l = vsprintf(log_line, fmt, ap); >+ l = vsnprintf(log_line, sizeof(log_line, "%s",fmt, ap); > > p1=log_line; > while((*p1!=0)&&(*p1!=13)&&(*p1!=10)) p1++;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22256
:
18854
|
18905
| 19013