Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [bug] busyloop upon $=var with NULs when $IFS contains both NUL and a byte > 0x7f



> On 29/11/2022 14:27 Jun. T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
> 3834         for (; *s; r++) {                                                 
> 3835             char *ie = itype_end(s, ISEP, 1);               
> 3836             if (ie != s) {                                             
> 3837                 s = ie;                                                
> ....                          
> 3840             }                                          
> 3841             (void)findsep(&s, NULL, 0);
> ....
> 3845         }
> 
> Here, the pointer s already points to a ISEP (\x83\x20 = metafied Nul),
> but itype_end() can't find the next ISEP (ie == s) due to the empty
> ifs_wide, and findsep() does not move s because *s is already ISEP,
> resulting in infinite-loop with the same s.

I guess the obvious thing to do here is any time s doesn't move
give up splitting at that point.

pws




Messages sorted by: Reverse Date, Date, Thread, Author