Skip to content

Commit 89c8411

Browse files
committed
always initialize allocated memory
1 parent 0a9999e commit 89c8411

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libde265/image.cc

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ static inline void *ALLOC_ALIGNED(size_t alignment, size_t size) {
5555
if (posix_memalign(&mem, alignment, size) != 0) {
5656
return NULL;
5757
}
58+
memset(mem, 0, size);
5859
return mem;
5960
};
6061
#define FREE_ALIGNED(mem) free((mem))

0 commit comments

Comments
 (0)