Check-in [7e211d072e]
Overview
Comment:Updated to use time to ensure that a duplicate ETag is never generated
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7e211d072e9c771d73b522545fe4094672e716b9
User & Date: rkeene on 2014-02-12 06:11:22
Other Links: manifest | tags
Context
2014-02-12
17:42
Fixed NULL pointer dereference and also possible buffer overflow processing HTTP request, created in [8cb189c633] check-in: dd737cd8c7 user: rkeene tags: trunk
06:11
Updated to use time to ensure that a duplicate ETag is never generated check-in: 7e211d072e user: rkeene tags: trunk
01:40
Fixed wrapping of --help check-in: 2fe411187a user: rkeene tags: trunk
Changes

Modified filed.c from [b986b06d75] to [ba4c14a79b].

   536    536   #include "filed-mime-types.h"
   537    537   
   538    538   	return(FILED_DEFAULT_TYPE);
   539    539   }
   540    540   
   541    541   /* Generate a unique identifier */
   542    542   static void filed_generate_etag(char *etag, size_t length) {
   543         -	snprintf(etag, length, "%llx%llx%llx%llx",
          543  +	snprintf(etag, length, "%llx-%llx%llx%llx%llx",
          544  +		(unsigned long long) time(NULL),
   544    545   		(unsigned long long) random(),
   545    546   		(unsigned long long) random(),
   546    547   		(unsigned long long) random(),
   547    548   		(unsigned long long) random()
   548    549   	);
   549    550   }
   550    551