[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev [Patch] The ever-popular malloc nibbles
From: |
John Bley |
Subject: |
lynx-dev [Patch] The ever-popular malloc nibbles |
Date: |
Thu, 14 Jan 1999 15:38:20 -0500 (EST) |
Both against 2.8.2dev13
Making the world better one tiny insignificant patch at a time,
--
John Bley - address@hidden
Duke '99 - English/Computer Science
Since English is a mess, it maps well onto the problem space,
which is also a mess, which we call reality. - Larry Wall
--- LYStrings.c.orig Thu Jan 14 15:21:18 1999
+++ LYStrings.c Thu Jan 14 15:26:23 1999
@@ -2603,6 +2603,8 @@
unsigned len = strlen(str);
LYCloset[LYClosetTop] = malloc(len+1);
+ if (!LYCloset[LYClosetTop])
+ outofmem(__FILE__, "LYAddToCloset");
strcpy(LYCloset[LYClosetTop], str);
LYClosetTop = (LYClosetTop + 1) % LYClosetSize;
--- LYCurses.c.orig Thu Jan 14 15:27:18 1999
+++ LYCurses.c Thu Jan 14 15:25:51 1999
@@ -282,6 +282,8 @@
ds->code=style;
FREE(ds->name);
ds->name=malloc(sizeof(char)*(strlen(element)+2));
+ if(!ds->name)
+ outofmem(__FILE__, "setHashStyle");
strcpy(ds->name, element);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev [Patch] The ever-popular malloc nibbles,
John Bley <=