samstyle / Xpeccy

Multiplatform emulator of retro computers
MIT License
73 stars 14 forks source link

ither the condition 'sect>7' is redundant or the array 'dchNames[7]' is accessed at index 7, which is out of bounds. #101

Closed ZanyXDev closed 3 years ago

ZanyXDev commented 3 years ago

Array size == 7 https://github.com/samstyle/Xpeccy/blob/0c7c288ead6d94c197f0ccbf57e68b64b5744f75/src/xgui/options/opt_diskcat.cpp#L17 But condition check sect > 7 https://github.com/samstyle/Xpeccy/blob/0c7c288ead6d94c197f0ccbf57e68b64b5744f75/src/xgui/options/opt_diskcat.cpp#L23

that posible condition sect == 7 which is out of bounds. https://github.com/samstyle/Xpeccy/blob/0c7c288ead6d94c197f0ccbf57e68b64b5744f75/src/xgui/options/opt_diskcat.cpp#L24

samstyle commented 3 years ago

OK. Thank you for all issues. I will fix all of them right now.