groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new tbl segfault


From: G. Branden Robinson
Subject: Re: new tbl segfault
Date: Sat, 5 Oct 2024 17:32:40 -0500

At 2024-10-05T14:08:12+0000, Lennart Jablonka wrote:
>       commit a91cd457d95e4e6b67adf3d00185598afccfc87d
[snip]
> Branden, the class string doesn’t null-terminate its buffer.

Whoops.  Good grief.  Yes, it implements a Pascal-style string.

I'm a bit annoyed that _I_ don't get a segfault, even if I exercise the
code 100 times.

$ for n in $(seq 100); do ./build/test-groff -T ascii -t 
EXPERIMENTS/bad-escapes-in-tables.roff > /dev/null 2>&1 || printf 'OOPS %d ' 
$n; done; echo

(The "bad-escapes-in-tables.roff" script is in the aforementioned commit
message.)

In a development environment I generally want maximum paranoia and
maximum intolerance.

> The function strstr expects a null-terminated string.  You could use
> memmem instead of strstr.

Thanks, yes--I'll do something like that.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]