Menu

#8 out of bounds access

open
nobody
None
5
2004-10-19
2004-10-19
Nikolay
No

In engine.cpp, Engine::parseNum, line 406, if the first
character of the buffer is a digit, the code may cause
an access violation:

if(isdigit(buffer[i]) && !isalpha(buffer[i-1])) {

should be something like

if(isdigit(buffer[i]) && (i == 0 ||
!isalpha(buffer[i-1]))) {

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.