Axel, Attached is a simplistic patch to fix a problem with builtin_source. If one attempts to ". some_directory", fish will get stuck in an infinite loop. This patch requires a normal file as an argument. It would probably be better to still allow symbolic links as long as they point to an actual file, but this at least puts a band-aid over the immediate problem.
James -- GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>
New patches:
[builtin.c: builtin_source now checks that its argument is a file.
James Vega <[EMAIL PROTECTED]>**20051215172122
Without this check, it would be possible to attempt to source a directory and
get stuck in an infinite loop.
] {
hunk ./builtin.c 2166
+ struct stat buf;
hunk ./builtin.c 2177
+ if( wstat(argv[1], &buf) == -1 )
+ {
+ builtin_wperror( L"stat" );
+ res = 1;
+ }
+
+ if( !S_ISREG(buf.st_mode) )
+ {
+ sb_append2( sb_err, argv[0], L": Expected a regular file\n",
(void *)0 );
+ builtin_print_help( argv[0], sb_err );
+
+ return 1;
+ }
}
Context:
[Code cleanup
[EMAIL PROTECTED]
[Add missing -r/--replace switch to commandline builtin
[EMAIL PROTECTED]
[Add extra step in instructions on creating a builtin
[EMAIL PROTECTED]
[Add missing newline at end of yum completion file
[EMAIL PROTECTED]
[Add missing documentation file
[EMAIL PROTECTED]
[Minor documentation edits
[EMAIL PROTECTED]
[Fix Alt-p shortcut
[EMAIL PROTECTED]
[Add separator characters to make quoted variable expantion works properly
[EMAIL PROTECTED]
[Fix crash bug from calling eval builtin with no arguments
[EMAIL PROTECTED]
[Code tweaks
[EMAIL PROTECTED]
[Code tweaks
[EMAIL PROTECTED]
[Use different abbrevation for prompt_pwd
[EMAIL PROTECTED]
[Simplify pwd function
[EMAIL PROTECTED]
[Simplify greeting code
[EMAIL PROTECTED]
[More tweaks
[EMAIL PROTECTED]
[Use . as CDPATH if CDPATH is zero length
[EMAIL PROTECTED]
[Lots of fixed typos. Thanks, Harshad!
[EMAIL PROTECTED]
[Minor tweaks
[EMAIL PROTECTED]
[Autodetect common escape codes in fish_prompt output
[EMAIL PROTECTED]
[Fix infinite loop in token search
[EMAIL PROTECTED]
[Fix bug causing inconsistent state and shutdown when the begin command was
used in a function definition
[EMAIL PROTECTED]
[Further tweaks to jobs builtin
[EMAIL PROTECTED]
[Minor edits
[EMAIL PROTECTED]
[Revamp the jobs builtin
[EMAIL PROTECTED]
[Use char instead of unsigned char in xdgmime files. Avoids a few warnings.
[EMAIL PROTECTED]
[Do not call fcntl before fully reading block.Escalates bug severity without
any practical benefit.
[EMAIL PROTECTED]
[Make type fuction handle hidden functions
[EMAIL PROTECTED]
[Initial blocking implementation
[EMAIL PROTECTED]
[Fix crash bug in token search
[EMAIL PROTECTED]
[Remove compiler warning
[EMAIL PROTECTED]
[Make sure tokenizer never changes input string
[EMAIL PROTECTED]
[Escape the ~ character
[EMAIL PROTECTED]
[TAG 1.18.1
[EMAIL PROTECTED]
Patch bundle hash:
babba8fad5f1860ded2f4bc2b354a062484c31c5
pgpe4gz6urajS.pgp
Description: PGP signature
