Skip to content
  • Rob Swindell's avatar
    4a86ab87
    Bounds-check subnum in savemsg() · 4a86ab87
    Rob Swindell authored
    It's possible to use savemsg() (from JS MsgBase.save_msg()) to add a message
    to a message base that's not a sub-board (not configured in SCFG->Message
    Areas and not the "mail" base), but in that case, savemsg() would dereference
    an invalid sub in the scfg->sub array and crash. So use is_valid_subum()
    to insure the subnum is a valid sub before using as an index.
    4a86ab87
    Bounds-check subnum in savemsg()
    Rob Swindell authored
    It's possible to use savemsg() (from JS MsgBase.save_msg()) to add a message
    to a message base that's not a sub-board (not configured in SCFG->Message
    Areas and not the "mail" base), but in that case, savemsg() would dereference
    an invalid sub in the scfg->sub array and crash. So use is_valid_subum()
    to insure the subnum is a valid sub before using as an index.
Loading