X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=aft.c;h=e370eaad80cdfadc9dbd62b357442e200945934e;hb=3685a9093ae12ff9ce02fc58e607eb9b63894443;hp=5595071f2ade631b25db6872b13dcec978ba9141;hpb=92c6b27d3a3fb01cf516be2fa8885d07ca92c9c7;p=paraslash.git diff --git a/aft.c b/aft.c index 5595071f..e370eaad 100644 --- a/aft.c +++ b/aft.c @@ -407,7 +407,7 @@ static void load_chunk_table(struct afh_info *afhi, const struct osl_object *ct) int i; size_t sz; - if (!ct->data || ct->size < 4) { + if (!ct->data || ct->size < 4 * (afhi->chunks_total + 1)) { afhi->chunk_table = NULL; return; } @@ -2534,10 +2534,12 @@ static int aft_open(const char *dir) PARA_NOTICE_LOG("current audio file hash lookup: success\n"); return 1; } - PARA_NOTICE_LOG("failed to open audio file table\n"); audio_file_table = NULL; - if (ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT)) + if (ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT)) { + PARA_WARNING_LOG("no audio file table\n"); return 1; + } + PARA_NOTICE_LOG("failed to open audio file table\n"); return ret; } @@ -2620,6 +2622,10 @@ static int aft_event_handler(enum afs_events event, struct para_buffer *pb, * current status items are affected and simply recreate them * every time. */ + ret = get_afhi_of_row(current_aft_row, + &status_item_ls_data.afhi); + if (ret < 0) + return ret; make_status_items(); return 0; } default: