Commit Diff
- Commit:
41d076f23c766a71323a3c7fbe9889cb54752f1a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
- Message:
- ensure that window size information is always initialized Fixes a divide-by-zero crash reported by sthen@. To reproduce: printf 'show\nshow run\n' > /tmp/nsh.script nsh -i /tmp/nsh.script ok chris
- Actions:
- Patch | Tree
--- main.c +++ main.c @@ -254,6 +254,8 @@ main(int argc, char *argv[]) * Interpret config file and exit */ priv = 1; + + setwinsize(0); create_db(); @@ -277,6 +279,8 @@ main(int argc, char *argv[]) */ priv = 1; + setwinsize(0); + create_db(); cmdrc(rc);