On Jan 26 13:06, Corinna Vinschen wrote:
> The code handling \<oct> expressions (backslash with 3 octal digits)
> neglects to increment the pointer to the target string afterwards,
> thus the next character simply overwrites the character created from
> the \<oct> expression.
> 
> Signed-off-by: Corinna Vinschen <[email protected]>
> ---
>  winsup/utils/gencat.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/winsup/utils/gencat.c b/winsup/utils/gencat.c
> index f86b17b4a922..5b9e149739db 100644
> --- a/winsup/utils/gencat.c
> +++ b/winsup/utils/gencat.c
> @@ -448,6 +448,7 @@ getmsg(int fd, char *cptr, char quote)
>                                                       *tptr += (*cptr - '0');
>                                                       ++cptr;
>                                               }
> +                                             ++tptr;
>                                       } else {
>                                               warning(cptr, "unrecognized 
> escape sequence");
>                                       }
> -- 
> 2.52.0

In the meantime, this patch has gone upstream:
https://gnats.netbsd.org/59946
https://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/gencat/gencat.c.diff?r1=1.36;r2=1.37

I also built the tcsh message catalog files successfully with this
version of gencat, which was especially interesting due the problem
fixed by this patch: the string "\040hard" resulted in "hard" instead of
in " hard" with leading space in the catalog file.

This bug affects our current version of gencat as well, btw., so I'd
like to push these patches to the 3.6 branch, too, just like the patch
from "Cygwin: fhandler_socket::fchown: fix check for admin user"
https://sourceware.org/pipermail/cygwin-patches/2026q1/014589.html.

Please review.


Thanks,
Corinna

Reply via email to