Displaying 2 results from an estimated 2 matches for "filter_application_by_id".
2012 Apr 05
3
[PATCH] Fix buffer overflow in metaflac
...c b/src/metaflac/options.c
index eb3498d..2cb0959 100644
--- a/src/metaflac/options.c
+++ b/src/metaflac/options.c
@@ -1040,7 +1040,7 @@ FLAC__bool parse_block_type(const char *in, Argument_BlockType *out)
out->entries[entry].type = FLAC__METADATA_TYPE_APPLICATION;
out->entries[entry].filter_application_by_id = (0 != r);
if(0 != r) {
- if(strlen(r) == 4) {
+ if(strlen(r) == 3) {
strcpy(out->entries[entry].application_id, r);
}
else if(strlen(r) == 10 && strncmp(r, "0x", 2) == 0 && strspn(r+2, "0123456789ABCDEFabcdef") == 8) {
--
1.7.9.2
2012 Apr 06
1
[PATCH] Fix buffer overflow in metaflac
...cb0959 100644
> --- a/src/metaflac/options.c
> +++ b/src/metaflac/options.c
> @@ -1040,7 +1040,7 @@ FLAC__bool parse_block_type(const char *in, Argument_BlockType *out)
>? ??? ??? ??? out->entries[entry].type = FLAC__METADATA_TYPE_APPLICATION;
>? ??? ??? ??? out->entries[entry].filter_application_by_id = (0 != r);
>? ??? ??? ??? if(0 != r) {
> -??? ??? ??? ??? if(strlen(r) == 4) {
> +??? ??? ??? ??? if(strlen(r) == 3) {
>? ??? ??? ??? ??? ??? strcpy(out->entries[entry].application_id, r);
>? ??? ??? ??? ??? }
I actually think that this is a better solution:
? ? ? ? ? ? ? ? ?...