Re: size_t issue in expand_string_dollar_quote

2023-03-31 Thread Chet Ramey
On 3/29/23 6:28 PM, Grisha Levit wrote: bash --norc -in <<<$'"\e\cE' ERROR: AddressSanitizer: negative-size-param: (size=-1) #0 wrap_strncpy+0x228 #1 expand_string_dollar_quote subst.c:4108 #2 shell_expand_line bashline.c:2887 Thanks for the report. probably not the cleanest f

size_t issue in expand_string_dollar_quote

2023-03-29 Thread Grisha Levit
bash --norc -in <<<$'"\e\cE' ERROR: AddressSanitizer: negative-size-param: (size=-1) #0 wrap_strncpy+0x228 #1 expand_string_dollar_quote subst.c:4108 #2 shell_expand_line bashline.c:2887 probably not the cleanest fix but the issue is here: diff --git a/subst.c b/subst.c index 2ff9b7c