-/* $OpenBSD: http.c,v 1.4 2021/03/04 14:24:54 claudio Exp $ */
+/* $OpenBSD: http.c,v 1.5 2021/03/04 15:44:13 tb Exp $ */
/*
* Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com>
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.com>
} else if (strncasecmp(cp, LAST_MODIFIED,
sizeof(LAST_MODIFIED) - 1) == 0) {
cp += sizeof(LAST_MODIFIED) - 1;
- conn->last_modified = strdup(cp);
+ if ((conn->last_modified = strdup(cp)) == NULL)
+ err(1, NULL);
}
return 1;
-/* $OpenBSD: main.c,v 1.113 2021/03/04 15:35:39 claudio Exp $ */
+/* $OpenBSD: main.c,v 1.114 2021/03/04 15:44:13 tb Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
buf = tal_read_file(file);
/* Record tal for later reporting */
- if (stats.talnames == NULL)
- stats.talnames = strdup(file);
- else {
+ if (stats.talnames == NULL) {
+ if ((stats.talnames = strdup(file)) == NULL)
+ err(1, NULL);
+ } else {
char *tmp;
if (asprintf(&tmp, "%s %s", stats.talnames, file) == -1)
err(1, NULL);