Home » U++ Library support » U++ MT-multithreading and servers » Web/TServ [BUG][FIXED]
Web/TServ [BUG][FIXED] [message #2139] |
Sun, 02 April 2006 12:29  |
hojtsy
Messages: 241 Registered: January 2006 Location: Budapest, Hungary
|
Experienced Member |
|
|
This code in Web/TServ seems to be a failed attempt at being very tricky.
if(*_command == '\"') {
while(*++_command && *_command != '\"' || *++_command == '\"')
exec.Cat(*_command);
}
This could crash on a certain kind of unexpected input. If the string starts with a quote, but does not contain the closing pair, the memory after the \0 is read and compared to the quote char. This could be segfault in itself, but if it accidentally equals quote, the memory is read further. I suppose that the other side of the app does not send such invalid string, but it would still be more elegant to not crash on any kind of input.
[Updated on: Wed, 03 May 2006 20:04] by Moderator Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Jul 07 08:30:11 CEST 2025
Total time taken to generate the page: 0.03710 seconds
|