public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3333bd9
)
init: don't read NULL pointers
author
Alan Cox
<alan@linux.intel.com>
Fri, 21 Oct 2016 16:51:53 +0000
(17:51 +0100)
committer
Alan Cox
<alan@linux.intel.com>
Fri, 21 Oct 2016 16:51:53 +0000
(17:51 +0100)
Needed for the 68K port as it causes a trap
Applications/util/init.c
patch
|
blob
|
history
diff --git
a/Applications/util/init.c
b/Applications/util/init.c
index
d989488
..
e2282fd
100644
(file)
--- a/
Applications/util/init.c
+++ b/
Applications/util/init.c
@@
-630,7
+630,6
@@
static int envn;
static void envset(const char *a, const char *b)
{
int al = strlen(a);
- static char hptr[5];
/* May unalign the memory pool but we don't care by this point */
char *tp = sbrk(al + strlen(b) + 2);
if (tp == (char *) -1) {
@@
-688,6
+687,9
@@
const char *bauds[] = {
static int baudmatch(const char *p)
{
const char **str = bauds;
+ if (p == NULL)
+ return B9600;
+
int i;
for(i = 1; i < 15; i++) {
if (strcmp(p, *str++) == 0)