mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
Fix CID 39916: potential dereference of Null pointer.
This commit is contained in:
parent
f8eb3531a4
commit
4042ebe3d1
5
search.c
5
search.c
@ -1377,9 +1377,10 @@ static int rmcstr(void)
|
|||||||
if ((rmcptr->rstr = malloc(mj + 1)) == NULL) {
|
if ((rmcptr->rstr = malloc(mj + 1)) == NULL) {
|
||||||
mloutstr( "%Out of memory") ;
|
mloutstr( "%Out of memory") ;
|
||||||
status = FALSE;
|
status = FALSE;
|
||||||
|
} else {
|
||||||
|
strncpy(rmcptr->rstr, patptr - mj, mj);
|
||||||
|
rmcptr++;
|
||||||
}
|
}
|
||||||
strncpy(rmcptr->rstr, patptr - mj, mj);
|
|
||||||
rmcptr++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rmcptr->mc_type = MCNIL;
|
rmcptr->mc_type = MCNIL;
|
||||||
|
Loading…
Reference in New Issue
Block a user