projects
/
platform
/
upstream
/
wayland.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e53e0ed
)
cursor/convert_font.c: malloc cannot guarantee that the memory allocated is always...
author
ganjing
<ganjing@uniontech.com>
Mon, 27 Jul 2020 03:22:40 +0000
(11:22 +0800)
committer
Simon Ser
<contact@emersion.fr>
Thu, 29 Oct 2020 13:00:20 +0000
(13:00 +0000)
cursor/convert_font.c
patch
|
blob
|
history
diff --git
a/cursor/convert_font.c
b/cursor/convert_font.c
index
45b6ac6
..
74e45fb
100644
(file)
--- a/
cursor/convert_font.c
+++ b/
cursor/convert_font.c
@@
-499,6
+499,11
@@
output_interesting_cursors()
struct reconstructed_glyph *glyphs =
malloc(n * sizeof(*glyphs));
+ if (!glyphs) {
+ printf("reconstructed_glyph malloc failed\n");
+ abort();
+ }
+
for (i = 0; i < n; ++i) {
struct glyph *cursor, *mask;
find_cursor_and_mask(interesting_cursors[i].source_name,