x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

regimp problems

1 2
torch Page Icon Posted 2023-01-30 12:34 AM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,479
Location:
United States 
Status:
Thank you. I will.
Also check the SCL for open source tag. There’s some other registry programs I found from datadiode. Maybe those can be haxorred for ce5.0 even though the binaries are 6.0
Maybe worth a shot.
Or just see if they run on 5
 Top of the page
I dunk for bananas Page Icon Posted 2023-01-30 1:21 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
666
Location:
Europe
Status:
I think this is the part where it parses spaces/delimiters in command line arguments:

Would it be easy to fix the space issue here?

Edited by I dunk for bananas 2023-01-30 1:32 PM




(Untitled.jpg)



Attachments
----------------
Attachments Untitled.jpg (28KB - 0 downloads)
 Top of the page
watamario15 Page Icon Posted 2023-02-01 4:04 PM
#
Avatar image of watamario15
Factorite (Senior)

Posts:
78
Location:
Japan
Status:
I'd expect that replacing that code block with the following one works, although I haven't tested and couldn't clearly figure out how that program handles invalid arguments.

case 'f': 
case 'F': { 
//
// f:"filename"
// ^
if (lpCmdLine[iCmd++] != ':') goto f_parse_error;

//
// f:"filename"
// ^
BOOL isQuoted = FALSE; // Whether double-quote (") is used
if (lpCmdLine[iCmd] == '"') {
iCmd++;
isQuoted = TRUE;
}

//
// f:"filename"
// ^^^^^^^^
UINT iEnd = iCmd; // Final index of this argument
while (true) {
// No closing quote
if (isQuoted && lpCmdLine[iEnd] == 0) goto f_parse_error;

// Found a closing quote without a starting quote
if (!isQuoted && lpCmdLine[iEnd] == '"') goto f_parse_error;

// End of this argument
if (!isQuoted && (lpCmdLine[iEnd] == 0 || lpCmdLine[iEnd] == ' ')) break;

// Closing quote
if (isQuoted && lpCmdLine[iEnd] == '"') {
// Unexpected continuation
if (lpCmdLine[iEnd] != ' ' && lpCmdLine[iEnd] != 0) goto f_parse_error;
break;
}

iEnd++;
}

// File name is empty
if (iCmd == iEnd) goto f_parse_error;

lpCmdLine[iEnd] = 0;
m_AppParams.lpszTargetFileName = _tcsdup(&lpCmdLine[iCmd]);
iCmd = iEnd;
break;

f_parse_error:
CHelpDlg dlg;
dlg.DoModal();
break;
}


Replace each emoticon with a closing parenthesis.
)
 Top of the page
1 2
Jump to forum:
Seconds to generate: 0.171 - Cached queries : 60 - Executed queries : 10