projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8431f78
)
babl: avoid potential NULL deref of malloc result in ICC code
author
Øyvind Kolås
<pippin@gimp.org>
Sat, 13 Jun 2020 21:20:42 +0000
(23:20 +0200)
committer
Øyvind Kolås
<pippin@gimp.org>
Sun, 28 Jun 2020 15:28:32 +0000
(17:28 +0200)
babl/babl-icc.c
patch
|
blob
|
history
diff --git
a/babl/babl-icc.c
b/babl/babl-icc.c
index 96cc1664d13208b9d9e5d58522e1c8270adaabf4..a21888f702bdc77e85e13164eeb482cb2bb8c264 100644
(file)
--- a/
babl/babl-icc.c
+++ b/
babl/babl-icc.c
@@
-960,6
+960,8
@@
babl_space_from_icc (const char *icc_data,
return ret;
ret->space.icc_length = icc_length;
ret->space.icc_profile = malloc (icc_length);
+ if (!ret->space.icc_profile)
+ return NULL;
memcpy (ret->space.icc_profile, icc_data, icc_length);
#ifdef HAVE_LCMS