• antirez's avatar
    RDB: handle encoding errors with rdbExitReportCorruptRDB(). · bd0f06c1
    antirez authored
    Without such change, the diskless replicas, when loading RDB files from
    the socket will not abort when a broken RDB file gets loaded. This is
    potentially unsafe, because right now Redis is not able to guarantee
    that encoding errors are safe from the POV of memory corruptions (for
    instance the LZF library may not be safe against untrusted data?) so
    better to abort when the RDB file we are going to load is corrupted.
    
    Instead I/O errors are still returned to the caller without aborting,
    so that in case of short read the diskless replica can try again.
    bd0f06c1
rdb.c 99.1 KB