Skip to content
Snippets Groups Projects

Fix use after free bug

Merged Eidolon requested to merge more-use-afters-frees into next
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Eidolon added 24 commits

    added 24 commits

    Compare with previous version

  • Eidolon resolved all threads

    resolved all threads

  • Sal
    Sal @TehRealSalt started a thread on the diff
  • 3059 3059 mobj->player->viewz = mobj->player->mo->z + mobj->player->viewheight;
    3060 3060 }
    3061 3061
    3062 if (mobj->type == MT_SKYBOX)
    3063 {
    3064 if (mobj->spawnpoint->options & MTF_OBJECTSPECIAL)
    3065 skyboxmo[1] = mobj;
    3066 else
    3067 skyboxmo[0] = mobj;
    3068 }
    3069
    • Comment on lines +3062 to +3069
      Contributor

      This code would be drastically different for 2.2 codebase. 2.1 / Kart can only have one set of skybox viewpoint/centerpoint, whereas 2.2 stores 16 since there's an added Change Skybox linedef. MTF_OBJECTSPECIAL is also deprecated as of UDMF.

      Would look something like this, haven't tested myself though:

      Suggested change
      3066 if (mobj->type == MT_SKYBOX)
      3067 {
      3068 if (mobj->spawnpoint->options & MTF_OBJECTSPECIAL)
      3069 skyboxmo[1] = mobj;
      3070 else
      3071 skyboxmo[0] = mobj;
      3072 }
      3073
      3066 if (mobj->type == MT_SKYBOX && mobj->spawnpoint)
      3067 {
      3068 mtag_t tag = Tag_FGet(&mobj->spawnpoint->tags);
      3069 if (tag >= 0 && tag <= 15)
      3070 {
      3071 if (mobj->spawnpoint->args[0])
      3072 skyboxcenterpnts[tag] = mobj;
      3073 else
      3074 skyboxviewpnts[tag] = mobj;
      3075 }
      3076 }
      3077

      And then after all of the savegame mobjs have been unarchived:

      	skyboxmo[0] = skyboxviewpnts[0];
      	skyboxmo[1] = skyboxcenterpnts[0];
    • Please register or sign in to reply
  • LJ Sonic added Bug label

    added Bug label

  • Eidolon added 1 commit

    added 1 commit

    Compare with previous version

  • Eidolon added 1 commit

    added 1 commit

    Compare with previous version

  • merged

  • MascaraSnake mentioned in commit f50e7f25

    mentioned in commit f50e7f25

  • Please register or sign in to reply
    Loading