Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libopusenc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
libopusenc
Commits
fe51d9c3
Unverified
Commit
fe51d9c3
authored
Dec 29, 2017
by
Mark Harris
Committed by
Jean-Marc Valin
Dec 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relax JPEG check to allow EXIF metadata
Signed-off-by:
Jean-Marc Valin
<
jmvalin@jmvalin.ca
>
parent
bdf3369e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
src/picture.c
src/picture.c
+1
-2
No files found.
src/picture.c
View file @
fe51d9c3
...
...
@@ -106,8 +106,7 @@ static int oi_strncasecmp(const char *a, const char *b, int n){
}
static
int
is_jpeg
(
const
unsigned
char
*
buf
,
size_t
length
){
return
length
>=
11
&&
memcmp
(
buf
,
"
\xFF\xD8\xFF\xE0
"
,
4
)
==
0
&&
(
buf
[
4
]
<<
8
|
buf
[
5
])
>=
16
&&
memcmp
(
buf
+
6
,
"JFIF"
,
5
)
==
0
;
return
length
>=
3
&&
memcmp
(
buf
,
"
\xFF\xD8\xFF
"
,
3
)
==
0
;
}
static
int
is_png
(
const
unsigned
char
*
buf
,
size_t
length
){
...
...
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