summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/fav.c1
-rw-r--r--mbbsd/read.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/mbbsd/fav.c b/mbbsd/fav.c
index eb1a838d..c06a9628 100644
--- a/mbbsd/fav.c
+++ b/mbbsd/fav.c
@@ -178,6 +178,7 @@ static int get_type_size(int type)
inline static void* fav_malloc(int size){
void *p = (void *)malloc(size);
+ assert(p);
memset(p, 0, size);
return p;
}
diff --git a/mbbsd/read.c b/mbbsd/read.c
index 537a1921..1c2e5de1 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -198,7 +198,9 @@ getkeep(char *s, int def_topline, int def_cursline)
else
def_cursline = -def_cursline;
p = (keeploc_t *) malloc(sizeof(keeploc_t));
+ assert(p);
p->key = (char *)malloc(strlen(s) + 1);
+ assert(p->key);
strcpy(p->key, s);
p->top_ln = def_topline;
p->crs_ln = def_cursline;