Menu

#508 null pointer in segment.c

v1.0_(example)
closed-fixed
None
5
2017-10-01
2017-09-25
BlueKiller
No

Here is the critical code:


  root=MagickAllocateMemory(IntervalTree *,sizeof(IntervalTree)); //1198
  root->child=(IntervalTree *) NULL;
  root->sibling=(IntervalTree *) NULL;
  root->tau=0.0;
  root->left=0;
  root->right=255;

MagickAllocateMemory(...) may return NULL, so the following operations on the “root" will dereference null pointer to cause memory error.

Credit: ADLab of Venustech

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2017-10-01
    • status: open --> closed-fixed
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2017-10-01

    This problem is fixed by Mercurial changeset 15211:c550763898eb. Thanks for the report!

     

Log in to post a comment.

MongoDB Logo MongoDB