mirror of
				https://bitbucket.org/s_l_teichmann/mtsatellite
				synced 2025-10-30 23:55:38 +01:00 
			
		
		
		
	Limit length of bulk string to 4MB. That should really be enough for a Minetest block.
This commit is contained in:
		| @@ -92,6 +92,10 @@ func (rp *RedisParser) bulkString(line []byte) bool { | ||||
| 	case i == 0: | ||||
| 		return rp.consumer.ConsumeBulkString([]byte{}) | ||||
| 	default: | ||||
| 		if i >= 4*1024*1024 { // 4MB should be sufficient | ||||
| 			return rp.consumer.ConsumeError( | ||||
| 				fmt.Errorf("Bulk string too large (%d bytes).\n", i)) | ||||
| 		} | ||||
| 		data := make([]byte, i, i) | ||||
| 		for rest := i; rest > 0; { | ||||
| 			var n int | ||||
|   | ||||
		Reference in New Issue
	
	Block a user