X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=ogg_afh_common.c;h=6e5a89347e383340f943e591254f64f05cc6f358;hp=adab7f481fbb0e7873c1d1e1ac4968834bd81fe3;hb=ce9e297eb91a932a11f81890c800d0380b5bc9c9;hpb=121015ff5cdbe6af7b84f6245ebe62fe2a52a859 diff --git a/ogg_afh_common.c b/ogg_afh_common.c index adab7f48..6e5a8934 100644 --- a/ogg_afh_common.c +++ b/ogg_afh_common.c @@ -127,19 +127,18 @@ int ogg_get_file_info(char *map, size_t numbytes, struct afh_info *afhi, { ogg_sync_state oss; ogg_page op; - long len = numbytes; char *buf; int ret, i, j, frames_per_chunk, ct_size; long long unsigned num_frames = 0; ogg_sync_init(&oss); ret = -E_OGG_SYNC; - buf = ogg_sync_buffer(&oss, len); + buf = ogg_sync_buffer(&oss, numbytes); if (!buf) goto out; - memcpy(buf, map, len); + memcpy(buf, map, numbytes); ret = -E_OGG_SYNC; - if (ogg_sync_wrote(&oss, len) < 0) + if (ogg_sync_wrote(&oss, numbytes) < 0) goto out; ret = process_ogg_packets(&oss, afhi, ci); if (ret < 0)