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
537
538
539
540
541
542
543


544
545
546
547
548
549
550
536
537
538
539
540
541
542

543
544
545
546
547
548
549
550
551







-
+
+







#include "filed-mime-types.h"

	return(FILED_DEFAULT_TYPE);
}

/* Generate a unique identifier */
static void filed_generate_etag(char *etag, size_t length) {
	snprintf(etag, length, "%llx%llx%llx%llx",
	snprintf(etag, length, "%llx-%llx%llx%llx%llx",
		(unsigned long long) time(NULL),
		(unsigned long long) random(),
		(unsigned long long) random(),
		(unsigned long long) random(),
		(unsigned long long) random()
	);
}