#4257 new defect

main_edit.c: Unchecked return value error spotted by Coverity

Reported by: Ryan Long Owned by:
Priority: normal Milestone: 6.1
Component: lib Version: 6
Severity: normal Keywords: upstream issue
Cc: Blocked By:
Blocking:

Description

CID 1255318: Unchecked return value in display_line().

1082static void display_line(struct editor *ed, int pos, int fullline) {
1083  int hilite = 0;
1084  int col = 0;
1085  int margin = ed->margin;
1086  int maxcol = ed->env->cols + margin;
1087  unsigned char *bufptr = ed->env->linebuf;
1088  unsigned char *p = text_ptr(ed, pos);
1089  int selstart, selend, ch;
1090  char *s;
1091
    CID 1255318 (#1 of 1): Unchecked return value (CHECKED_RETURN)1. check_return: Calling get_selection without checking return value (as is done elsewhere 5 out of 6 times).
1092  get_selection(ed, &selstart, &selend);

Change History (2)

comment:1 Changed on Feb 24, 2021 at 4:56:08 PM by Ryan Long

Keywords: upstream issue added

comment:2 Changed on Mar 8, 2021 at 8:56:14 PM by Ryan Long <ryan.long@…>

In 3246fa42/rtems:

main_edit.c: Fix Unchecked return value (CID #1255318)

CID 1255318: Unchecked return value in display_line().

Updates #4257

Note: See TracTickets for help on using tickets.