-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix undefined behavior in pty and .sh.match
This pull request fixes a few errors that occur when ksh is built with -fsanitize=address,undefined. src/cmd/builtin/pty.c: - Use PROC_op1 and long typecasts, which fixes this error under ASan: src/cmd/builtin/pty.c:356:18: runtime error: left shift of 12 by 28 places cannot be represented in type 'int' src/cmd/ksh93/sh/init.c: - Ensure mp->nodes is not NULL before making use of it. This change fixes two errors under ASan that occur during the exit and glob regression tests: src/cmd/ksh93/sh/init.c:868:6: runtime error: applying non-zero offset 18446744073709551600 to null pointer src/cmd/ksh93/sh/init.c:831:5: runtime error: applying non-zero offset 18446744073709551600 to null pointer
- Loading branch information
Showing
2 changed files
with
36 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters