Found by GCC 11 '-fanalyzer'.
* lib/immutable.c (immstrdup): Don't crash when immmalloc() fails.
+2021-04-30 Bruno Haible <bruno@clisp.org>
+
+ immutable: Fix crash when immmalloc() fails.
+ Found by GCC 11 '-fanalyzer'.
+ * lib/immutable.c (immstrdup): Don't crash when immmalloc() fails.
+
2021-04-30 Bruno Haible <bruno@clisp.org>
supersede: Fix crash when malloc() fails.
{
size_t size = strlen (string) + 1;
void *wp = immmalloc (size);
+ if (wp == NULL)
+ return NULL;
memcpy (wp, string, size);
return (const char *) immfreeze (wp);
}