Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c8981edd
Commit
c8981edd
authored
May 07, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only add 1 byte to av_malloc(0) when it actually returned NULL
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
91ff05f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mem.c
libavutil/mem.c
+2
-2
No files found.
libavutil/mem.c
View file @
c8981edd
...
...
@@ -71,8 +71,6 @@ void *av_malloc(size_t size)
/* let's disallow possible ambiguous cases */
if
(
size
>
(
INT_MAX
-
32
)
)
return
NULL
;
else
if
(
!
size
)
size
=
1
;
#if CONFIG_MEMALIGN_HACK
ptr
=
malloc
(
size
+
32
);
...
...
@@ -113,6 +111,8 @@ void *av_malloc(size_t size)
#else
ptr
=
malloc
(
size
);
#endif
if
(
!
ptr
&&
!
size
)
ptr
=
av_malloc
(
1
);
return
ptr
;
}
...
...
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