Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Tremor
Commits
7c30a663
Commit
7c30a663
authored
Mar 19, 2018
by
Timothy B. Terriberry
Committed by
Thomas Daede
Mar 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port r19426 from libvorbis.
Reject multiple headers of the same type.
parent
562307a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
info.c
info.c
+12
-1
No files found.
info.c
View file @
7c30a663
...
...
@@ -227,7 +227,6 @@ static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){
static
int
_vorbis_unpack_books
(
vorbis_info
*
vi
,
oggpack_buffer
*
opb
){
codec_setup_info
*
ci
=
(
codec_setup_info
*
)
vi
->
codec_setup
;
int
i
;
if
(
!
ci
)
return
(
OV_EFAULT
);
/* codebooks */
ci
->
books
=
oggpack_read
(
opb
,
8
)
+
1
;
...
...
@@ -367,6 +366,10 @@ int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op)
/* um... we didn't get the initial header */
return
(
OV_EBADHEADER
);
}
if
(
vc
->
vendor
!=
NULL
){
/* previously initialized comment header */
return
(
OV_EBADHEADER
);
}
return
(
_vorbis_unpack_comment
(
vc
,
&
opb
));
...
...
@@ -375,6 +378,14 @@ int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op)
/* um... we didn;t get the initial header or comments yet */
return
(
OV_EBADHEADER
);
}
if
(
vi
->
codec_setup
==
NULL
){
/* improperly initialized vorbis_info */
return
(
OV_EFAULT
);
}
if
(((
codec_setup_info
*
)
vi
->
codec_setup
)
->
books
>
0
){
/* previously initialized setup header */
return
(
OV_EBADHEADER
);
}
return
(
_vorbis_unpack_books
(
vi
,
&
opb
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment