CVSROOT: /cvs Module name: src Changes by: mill...@cvs.openbsd.org 2018/09/19 12:55:33
Modified files: bin/csh : dir.c Log message: If getcwd() fails in dinit(), the stat buffer 'swd' is used uninitialized by the else clause. Since it is used in both clauses we should perform the stat before the if(). However, fixing this causes 'cp' to be unitialized in some case so initialize cp to NULL and move the "cp == NULL" check out of the first if() clause now that it can be true in either case. OK miko@ deraadt@