Skip to content

Commit f4f54b1

Browse files
committed
Ensure that ensure_space does not leave a NULL pointer
1 parent ba1c093 commit f4f54b1

File tree

4 files changed

+1
-80
lines changed

4 files changed

+1
-80
lines changed

asan-launcher.c

Lines changed: 0 additions & 19 deletions
This file was deleted.

kittens/choose/output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static inline ssize_t ms_write(int fd, const void* buf, size_t count) { return _
2525

2626
static inline bool
2727
ensure_space(GlobalData *global, size_t sz) {
28-
if (global->output_sz < sz + global->output_pos) {
28+
if (global->output_sz < sz + global->output_pos || !global->output) {
2929
size_t before = global->output_sz;
3030
global->output_sz += MAX(sz, (64 * 1024));
3131
global->output = realloc(global->output, sizeof(text_t) * global->output_sz);

kitty/launcher/kitty

Lines changed: 0 additions & 13 deletions
This file was deleted.

symlink-deref.c

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)