diff options
| author | ganjing <ganjing@uniontech.com> | 2020-07-27 11:22:40 +0800 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2020-10-29 13:00:20 +0000 |
| commit | 1ea08d748cfa86d7395315ca3e52085b0e1c8155 (patch) | |
| tree | 4b7928964e4e46ba0d781e95dc9d462de19687b4 /cursor | |
| parent | doc: make reproducible (diff) | |
| download | wayland-1ea08d748cfa86d7395315ca3e52085b0e1c8155.tar wayland-1ea08d748cfa86d7395315ca3e52085b0e1c8155.tar.gz wayland-1ea08d748cfa86d7395315ca3e52085b0e1c8155.tar.bz2 wayland-1ea08d748cfa86d7395315ca3e52085b0e1c8155.tar.lz wayland-1ea08d748cfa86d7395315ca3e52085b0e1c8155.tar.xz wayland-1ea08d748cfa86d7395315ca3e52085b0e1c8155.tar.zst wayland-1ea08d748cfa86d7395315ca3e52085b0e1c8155.zip | |
cursor/convert_font.c: malloc cannot guarantee that the memory allocated is always successful
Diffstat (limited to 'cursor')
| -rw-r--r-- | cursor/convert_font.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cursor/convert_font.c b/cursor/convert_font.c index 45b6ac6..74e45fb 100644 --- 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, |
