Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
The previous version breaks if stdin is directed from a file, such as
/dev/null.
Signed-off-by: Malfurious <m@lfurio.us>
|
|
Signed-off-by: Malfurious <m@lfurio.us>
|
|
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>
|
|
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>
|
|
Removes an unnecessary instruction.
Signed-off-by: Malfurious <m@lfurio.us>
|
|
Signed-off-by: Malfurious <m@lfurio.us>
|