[Bug 995595] Allocators.xml

bugzilla at redhat.com bugzilla at redhat.com
Fri Aug 9 20:08:08 UTC 2013


https://bugzilla.redhat.com/show_bug.cgi?id=995595



--- Comment #1 from Florian Weimer <fweimer at redhat.com> ---
(In reply to Gé Baylard from comment #0)
> Description of problem:
> In Allocators.xml, line 135 to 138, you write:
> "     ....  For instance,
>       to allocate an array of <literal>n</literal> elements of type
>       <literal>T</literal>, check that the requested size is not
>       greater than <literal>n / sizeof(T)</literal>."
> 
> It is not rather?
> "   ....  For instance,
>       to allocate an array of <literal>n</literal> elements of type
>       <literal>T</literal>, check that the requested size is not
>       smaller than <literal>n * sizeof(T)</literal>."

Right, this is buggy, the expresion should be <literal>(~(size_t)0) /
sizeof(T)</literal>.  Thanks for spotting this.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the docs-qa mailing list