Reply To: annoying application error in 9.10.04

Product Compare Forums Multi-Edit Support annoying application error in 9.10.04 Reply To: annoying application error in 9.10.04

#6133
deleyd
Participant

One thing that can cause an internal buffer overflow in Multi-Edit is if one of the global history string variables is longer than around 990 characters and it gets used in a dialog box. Normally file path/name length is limited to 259 chars on Windows, but there was one instance when I was doing a Wildcard Tag Scan and strung together a lot of file names that exceeded this limit (because I wasn’t savvy enough to use a wildcard).

Here’s a simple program that will list all global string variables longer than 950. The output will go to window MSG-2.LOG. If any of the global variable names listed have the word HISTORY in it, it could be a problem.
[code:1rvqjpqe]#include Win32.sh
#include MsgLog.sh

void global950()
{
int gType;
str gv[ 32 ];
str gs[max_line_length];

gv = First_Global( gType );
while ( gv != ” )
{
if ( !gType ){
gs = Global_Str(gv);
if (svl(gs) > 950){
Pad_Str(gv, 32, " ");
DebugLog(2,"gv",gv+" "+gs);
}
}
gv = Next_Global( gType );
}
}[/code:1rvqjpqe]

(Dan refer to Deley Discussions “dialog.s buffer overflow”)