diff --git a/src/emoji.c b/src/emoji.c index 53a6d9b..deb3f79 100644 --- a/src/emoji.c +++ b/src/emoji.c @@ -29,6 +29,7 @@ char* emojify(char* content, struct mstdnt_emoji* emos, size_t emos_len) { + if (!(content && emos && emos_len)) return NULL; size_t sc_len; char* oldres = NULL; char* res = content; diff --git a/src/status.c b/src/status.c index bd751ef..1dce19c 100644 --- a/src/status.c +++ b/src/status.c @@ -396,6 +396,8 @@ char* reformat_status(struct session* ssn, char* greentextify(char* content) { + if (!content) return NULL; + const char* error; int erroffset; int rc;