You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running an application normally that takes command line arguments works fine, for example bg bg.bmp will start bg.fxf with a pointer to the string bg.bmp in sh.fxf's user input buffer. However, we run into trouble if an application is started in the background (making the shell return immediately) and then the user types into the input buffer again, causing the argument string to become overwritten. For example, *hjkl test.txt will launch hjkl.fxf and open the test.txt file and make sh.fxf immediately return to the prompt. Any typing into the shell prompt will now overwrite the memory that hjkl.fxf references for the passed file name. Even worse, if the user now exits the shell then hjkl will now reference freed memory.
sh.fxf should probably buffer the entire command line input for the lifetime of any applications that it launches. This means sh.fxf needs to keep an eye on the task IDs it creates and watch for them to exit. This is solely the fault of sh.fxf, other applications shouldn't have to care about the lifetime of the command line argument pointers that are passed to them.
The text was updated successfully, but these errors were encountered:
Running an application normally that takes command line arguments works fine, for example
bg bg.bmp
will start bg.fxf with a pointer to the stringbg.bmp
in sh.fxf's user input buffer. However, we run into trouble if an application is started in the background (making the shell return immediately) and then the user types into the input buffer again, causing the argument string to become overwritten. For example,*hjkl test.txt
will launch hjkl.fxf and open the test.txt file and make sh.fxf immediately return to the prompt. Any typing into the shell prompt will now overwrite the memory that hjkl.fxf references for the passed file name. Even worse, if the user nowexit
s the shell then hjkl will now reference freed memory.sh.fxf should probably buffer the entire command line input for the lifetime of any applications that it launches. This means sh.fxf needs to keep an eye on the task IDs it creates and watch for them to exit. This is solely the fault of sh.fxf, other applications shouldn't have to care about the lifetime of the command line argument pointers that are passed to them.
The text was updated successfully, but these errors were encountered: