summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-01-15Remove unnecessary stack allocationsHEADmasterMalfurious1-5/+1
Subtracting esp to allocate space on the stack is only necessary to preserve data that is already lower on the stack. By the time we use either the sockaddr struct or the temporary io buffer, we are finished accessing older stack values, so they can be overwritten. This saves 2 unnecessary instructions from the program. Signed-off-by: Malfurious <m@lfurio.us>
2023-01-14Write to stdout instead of stdinMalfurious1-2/+3
The previous version breaks if stdin is directed from a file, such as /dev/null. Signed-off-by: Malfurious <m@lfurio.us>
2023-01-13Improve code commentsMalfurious1-3/+3
Signed-off-by: Malfurious <m@lfurio.us>
2023-01-13Fix error handling for open() callMalfurious1-1/+1
Zero is a valid return value, so don't jmp to exit if the fd is equal to it. However, we would never expect zero to be returned as stdin is not closed. Signed-off-by: Malfurious <m@lfurio.us>
2023-01-12Fix bug in exit routineMalfurious1-0/+1
If an error condition is met during the pipe IO syscalls, eax will be filled with a negative value. We need to then zero the rest of the register before attempting to exit, so we don't continue on to execute garbage. Signed-off-by: Malfurious <m@lfurio.us>
2023-01-12Remove the use of ebpMalfurious1-4/+3
Removes an unnecessary instruction. Signed-off-by: Malfurious <m@lfurio.us>
2023-01-12Initial working version of laceMalfurious2-0/+149
Signed-off-by: Malfurious <m@lfurio.us>