mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-02 16:04:26 +00:00
Check block size before open a block file
This commit is contained in:
@@ -1355,7 +1355,7 @@ get_block_cb (evhtp_request_t *req, void *arg)
|
|||||||
|
|
||||||
blk_meta = seaf_block_manager_stat_block (seaf->block_mgr,
|
blk_meta = seaf_block_manager_stat_block (seaf->block_mgr,
|
||||||
store_id, 1, block_id);
|
store_id, 1, block_id);
|
||||||
if (blk_meta == NULL) {
|
if (blk_meta == NULL || blk_meta->size <= 0) {
|
||||||
evhtp_send_reply (req, EVHTP_RES_SERVERR);
|
evhtp_send_reply (req, EVHTP_RES_SERVERR);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user