Hi,
Issue found by Coverity Scan.
CID 210623 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
9. var_deref_op: Dereferencing null pointer next.

File: iup_maskmatch.c
Function: iMaskMatchCaptureResult

code:
  next = NULL;

  while (capture != NULL)
  {
    if (capture->type == IMASK_CAPT_OPEN)
    {
      ImaskCapt *cap = capture->next_one;

      capture->next_one = next;
      next = capture;
      capture = cap;
    }
    else
    {
      if (capture->pos >= next->pos)
        (*vars->function)((char)capture->which_one, next->pos, capture->pos, 
vars->text, vars->user);

      next = next->next_one;
      capture = capture->next_one;
    }
  }

Need rethink this function, if capture->type != IMASK_CAPT_OPEN and
next is NULL,

Best.
Ranier.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to