Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

JKA "Universal" Source Code + server buffer overflow bug

Page: 1 of 1
 sotki
06-01-2006, 8:38 PM
#1
Hi

firstofall i want to apologize for my poor english, i hope u can understand it... xD

i have read Trimbo's thread at http://www.lucasforums.com/showthread.php?p=1408504#post1408504)

its great i compiled the SDK with the patch from http://divoid.net/) just by executing a few commands...

as u know the game is affected by a buffer-overflow, that makes a server crash when anyone executes a malicious code. (there's more info here: http://aluigi.altervista.org/adv/jamsgbof-adv.txt)

this bug can be fixed by appling a patch on jampgamex86.dll... (theres more info here: http://aluigi.altervista.org/patches/jamsgfix.txt) And thats works perfectly in the Windows JKA Dedicated Serv (1.0)... I tried and the bug got fixed... xD

my problem is that always use the Linux JKA DED, and the jampgamei386.so created using ur JKA "Universal" Source Code is "pure", without bugfixes... and obviously i cannot apply this patch on it...

could u help me adding this bugfix to the jampgamei386.so???

Thnx very much...

Sotki
 bzug0
06-02-2006, 4:05 AM
#2
Well it is very easy to STOP that.
In G_Say make sure you move the Q_strncpyz( text, chatText, sizeof(text) ); line up towards the top.
And you could add somthing like this:

if (strlen(chatText) > MAX_SAY_TEXT) {
return;
}

This only stops the client to say everything that bigger than MAX_SAY_TEXT, but If you need something more usefull, for example to print the text only to the limit or something like that just change this. I can't help you more yet because I dont have my code here. Hope this helps ;)
 sotki
06-02-2006, 5:59 AM
#3
mmmm... thnx, i will recompile it with this modification...
 sotki
06-02-2006, 6:49 AM
#4
well, now ive got i new error... xD

the server launches correctly

"Loading dll file jampgame.
Sys_LoadDll(/usr/local/games/ja/base/jampgamei386.so)...
Sys_LoadDll(jampgame) found **vmMain** at 0x4205df40
Sys_LoadDll(jampgame) succeeded!
------- Game Initialization -------
gamename: basejka_mod
gamedate: Jun 2 2006
------------------------------------------------------------
"
but when clients try to connect they recieve this error message: "client/server game mismatch: basejk-1/basejka-1", and they cannot connect... xD

when i launch the server using the original jampgamei386.so i get this other game Initialition message

----------------------
47622 files in pk3 files
Loading dll file jampgame.
Sys_LoadDll(/usr/local/games/ja/base/jampgamei386.so)...
Sys_LoadDll(jampgame) found **vmMain** at 0x42000bb8
Sys_LoadDll(jampgame) succeeded!
------- Game Initialization -------
gamename: basejk
gamedate: Sep 9 2003
------------------------------------------------------------

Theres a differnce in the gamename... could this be the reason for that client crashing? What should i modify to make it work with jka 1.0 standard clients?

Thnx
 ensiform
06-02-2006, 5:38 PM
#5
you should not be using 1.0 get the 1.01 patch, nobody uses 1.0 anymore as the MP didnt really work.
 sotki
06-02-2006, 6:46 PM
#6
xD... the thing is that i cannot use 1.01 patch... windows2000 crashes with it (in my PC) and WXp crashes everytime i connect to a server (MAXSTRINGCONFIGS, and many other errors... xD)

do u know if i can get a jampgamei386.so for 1.0 with the compilation of JKA "Universal" Source Code???

sry about this... xD... what is MP? Multiplayer? xD
 ensiform
06-02-2006, 7:54 PM
#7
quit using a hacked jedi academy then... the code is only for 1.01 not 1.00 so you cant even use it anyway. even if it works, thats bad. i think a better explaination of "crashes" would be better or other than max config strings. i think u need to uninstall, delete your jka folder completely and try again. and upgrade ur computer :nervou

you need to use some linux distro to compile the .so, which i cant help you with.

and yes MP stands for multiplayer.
 sotki
06-03-2006, 5:46 AM
#8
xD... thnx ill try that... xD !!!
Page: 1 of 1