[Toybox] [PATCH 1/2] sh: implement \dD{}tT at AuvVW prompt control characters
Aleksander Morgado
aleksandermj at google.com
Wed Sep 24 07:34:58 PDT 2025
Hey
> Currently about a quarter of Bash's prompt control characters are supported, this patch brings it up to about 70%
+ } else {
+ fmt = strncpy(xmalloc(end-prompt), prompt, end-prompt);
+ fmt[end-prompt] = '\0';
+ prompt = end+1;
+ }
Isn't fmt[end-prompt] = '\0'; writing past the allocated buffer?
--
Aleksander
More information about the Toybox
mailing list