Changeset - r21520:22c5c9550ff0
[Not reviewed]
master
0 1 0
rubidium - 10 years ago 2014-06-09 17:43:59
rubidium@openttd.org
(svn r26637) -Fix [FS#6038]: segmentation fault when encountering a .obg/.obs/.obm with empty string/zero length/ MD5 checksums
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/base_media_func.h
Show inline comments
 
@@ -97,13 +97,13 @@ bool BaseSet<T, Tnum_files, Tsearch_in_t
 
		}
 

	
 
		file->filename = str_fmt("%s%s", path, filename);
 

	
 
		/* Then find the MD5 checksum */
 
		item = md5s->GetItem(filename, false);
 
		if (item == NULL) {
 
		if (item == NULL || item->value == NULL) {
 
			DEBUG(grf, 0, "No MD5 checksum specified for: %s (in %s)", filename, full_filename);
 
			return false;
 
		}
 
		char *c = item->value;
 
		for (uint i = 0; i < sizeof(file->hash) * 2; i++, c++) {
 
			uint j;
0 comments (0 inline, 0 general)