search for: num_com

Displaying 9 results from an estimated 9 matches for "num_com".

Did you mean: num_comp
2015 Jul 04
4
num_comments==0 and comments==0
About the removed assert in this commit: http://git.xiph.org/?p=flac.git;a=commitdiff;h=bc5113007a53be2c621d5eb5f4485eddf947ef37 It looks reasonable that if x.num_comments == 0 then x.comments is also NULL. Otherwise there's probably a leak somewhere that should be fixed. I found several places where the situation is reverse: comments can be 0 but num_comments is not; IMHO it makes sense to fix them even if there are no crashes (yet?). The patch is attac...
2015 Jul 04
0
num_comments==0 and comments==0
...commit change, but speak from general experience. On Jul 4, 2015, at 4:30 AM, lvqcl <lvqcl.mail at gmail.com> wrote: > About the removed assert in this commit: http://git.xiph.org/?p=flac.git;a=commitdiff;h=bc5113007a53be2c621d5eb5f4485eddf947ef37 > > It looks reasonable that if x.num_comments == 0 then x.comments is also NULL. > Otherwise there's probably a leak somewhere that should be fixed. > > > > I found several places where the situation is reverse: > comments can be 0 but num_comments is not; IMHO it makes sense > to fix them even if there are no...
2016 Mar 14
1
[PATCH] update obj->num_comments if short circuit in read_metadata_vorbiscomment_
In function read_metadata_vorbiscomment_ from stream_decoder.c, at various locations where we short circuit the computation, we also set `obj->num_comments` accordingly. For example: https://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/stream_decoder.c;h=e0f1b14d30dd548268a88e4341af3f38290816e3;hb=HEAD#l1736 https://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/stream_decoder.c;h=e0f1b14d30dd548268a88e4341af3f38290816e3;hb=HEAD#l1741 https://gi...
2014 Sep 25
2
Patch to improve malformed vorbiscomment handling
...eek seek_cb, FLAC__StreamMetadata_VorbisComment *block, unsigned block_length) { unsigned i; FLAC__Metadata_SimpleIteratorStatus status; @@ -2241,9 +2241,17 @@ FLAC__Metadata_SimpleIteratorStatus read_metadata_block_data_vorbis_comment_cb_( else if(0 == (block->comments = calloc(block->num_comments, sizeof(FLAC__StreamMetadata_VorbisComment_Entry)))) return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR; + block_length -= 8+block->vendor_string.length; for(i = 0; i < block->num_comments; i++) { if(FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK != (status = rea...
2014 Sep 26
0
Patch to improve malformed vorbiscomment handling
...eek seek_cb, FLAC__StreamMetadata_VorbisComment *block, unsigned block_length) { unsigned i; FLAC__Metadata_SimpleIteratorStatus status; @@ -2228,9 +2233,13 @@ FLAC__Metadata_SimpleIteratorStatus read_metadata_block_data_vorbis_comment_cb_( FLAC__ASSERT(FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN / 8 == sizeof(buffer)); - if(FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK != (status = read_metadata_block_data_vorbis_comment_entry_cb_(handle, read_cb, &(block->vendor_string)))) - return status; + status = read_metadata_block_data_vorbis_comment_entry_cb_(handle, read_cb, &(bl...
2018 Feb 07
4
Contar comas de una variable
Buenas tardes, Necesito contar cuántas comas hay en cada celda. Los datos tienen esta forma: Pros Comas Opinión 1 calidad, 1 Opinión 2 calidad, diseño, color, 3 Opinión 3 precio, accesibilidad, sienta bien, luminoso, 4 La variable Pros es la que tengo y la variable Comas es la
2014 Sep 26
0
Patch to improve malformed vorbiscomment handling
...eek seek_cb, FLAC__StreamMetadata_VorbisComment *block, unsigned block_length) { unsigned i; FLAC__Metadata_SimpleIteratorStatus status; @@ -2228,9 +2233,13 @@ FLAC__Metadata_SimpleIteratorStatus read_metadata_block_data_vorbis_comment_cb_( FLAC__ASSERT(FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN / 8 == sizeof(buffer)); - if(FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK != (status = read_metadata_block_data_vorbis_comment_entry_cb_(handle, read_cb, &(block->vendor_string)))) - return status; + status = read_metadata_block_data_vorbis_comment_entry_cb_(handle, read_cb, &(bl...
2014 Sep 26
2
Patch to improve malformed vorbiscomment handling
Janne Hyv?rinen wrote: > Patch v2, now handles more malformed cases. Original patch was for a > file for which I had a sample from a user but this allows handling some > manually broken test cases. Err, I'm getting warning messages on that patch: CC metadata_iterators.lo metadata_iterators.c: In function ?read_metadata_block_data_vorbis_comment_cb_?:
2015 Jun 28
2
about libFLAC/metadata_object.c
There are two functions: static void vorbiscomment_entry_array_delete_(FLAC__StreamMetadata_VorbisComment_Entry *object_array, unsigned num_comments); and static void cuesheet_track_array_delete_(FLAC__StreamMetadata_CueSheet_Track *object_array, unsigned num_tracks); which first dereference object_array and only then check it for NULL: free(object_array[i].indices); ... ... if(0 != object_...