1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-01 15:36:37 +00:00

Check block size before open a block file

This commit is contained in:
cuihaikuo
2017-07-10 16:48:55 +08:00
parent e096ccdfa8
commit 628bf6c9bf

View File

@@ -1355,7 +1355,7 @@ get_block_cb (evhtp_request_t *req, void *arg)
blk_meta = seaf_block_manager_stat_block (seaf->block_mgr,
store_id, 1, block_id);
if (blk_meta == NULL) {
if (blk_meta == NULL || blk_meta->size <= 0) {
evhtp_send_reply (req, EVHTP_RES_SERVERR);
goto out;
}