Changeset edea93c in rtems


Ignore:
Timestamp:
01/30/23 03:11:59 (2 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
f9169dc
Parents:
3ad2789
git-author:
Chris Johns <chrisj@…> (01/30/23 03:11:59)
git-committer:
Chris Johns <chrisj@…> (01/30/23 20:16:14)
Message:

libmisc/shell/edit: Return if no memory in move_gap

Closes #4835

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/shell/main_edit.c

    r3ad2789 redea93c  
    413413    newsize = (ed->end - ed->start) - gapsize + minsize;
    414414    start = (unsigned char *) malloc(newsize); // TODO check for out of memory
     415    if (start == NULL) {
     416        return;
     417    }
    415418    gap = start + pos;
    416419    rest = gap + minsize;
Note: See TracChangeset for help on using the changeset viewer.