Two users of GetReqExtra pass arbitrarily sized allocations from the
caller (ModMap and Host). Adjust _XGetRequest() (called by the GetReqExtra
macro) to double-check the requested length and invalidate "req" when
this happens. Users of GetReqExtra passing lengths greater than the Xlib
buffer size (normally 16K) must check "req" and fail gracefully instead
of crashing.
Any callers of GetReqExtra that do not check "req" for NULL
will experience this change, in the pathological case, as a NULL
dereference instead of a buffer overflow. This is an improvement, but
the documentation for GetReqExtra has been updated to reflect the need
to check the value of "req" after the call.
Bug that manifested the problem:
https://bugs.launchpad.net/ubuntu/+source/x11-xserver-utils/+bug/792628
Signed-off-by: Kees Cook <kees@outflux.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
The XListPixmapFormats arguments was being shown with XImageByteOrder's
name and return types. Appears to have been a glitch in the nroff ->
docbook conversion.
Reported-by: ZHANG Zhaolong <zhangzl2013@126.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
On certain tables, add top and bottom borders to table header
and a bottom border to the table. This matches what those
tables in the old pdfs looked like.
the <?dbfo keep-together='always'> prevents tables from
splitting across pages. Useful for tiny tables.
Converting the colwidth to a floating point, IE, 1* -> 1.0*
cleans up these build errors:
WARNING: table-layout="fixed" and column-width unspecified =>
falling back to proportional-column-width(1)
Signed-off-by: Matt Dew <marcoz@osource.org>
1 - fix the capitalization of the ID attributes to match either the
<title> or <funcdef> string it goes with.
2 - fix any <linkend>'s that were affected by 1.
3 - any <function> in the docs that has an actual funcdef,
will become an olink.
Signed-off-by: Matt Dew <marcoz@osource.org>
For documentation having multiple licenses, the copyright and legalnotice
elements sequence cannot instantiated multiple times.
The copyright notice and license text are therefore coded inside a legalnotice
element. The role attribute on the paragraph is used to allow styling of the
copyright notice text which should not be italicized.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Docbook groups all the <copyright> elements together and all the
<legalnotice> elements together.
We cannot have a sequence:
<copyright> <legalnotice> <copyright> <legalnotice> [...]
A workaround, which was done in some documents, is to put the copyright
notice inside the legalnotice in plain text without the <copyright> element.
A formal paragraph title is added here which makes the copyright notice bold,
and makes it much easier to locate.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
This element is not rendered by default on the title. A template
customization is required to display it.
X Window System does not have a product number.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Many tables had a questionnable layout and some had information dropped.
Each table was cross-referenced with a pre-docbook version
to ensure semantic integrity.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
There should be no toc for a simple preface with only one
Acknowledgments section.
Use <simplesect> markup rather than sect1.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Many, but not all, function synopsis have a paragraph that
nests the variable list. The code was generated by doclifter
and there is no apprent reasons as to why it was done this way.
Found while investigating a spacing issue.
Before the patch:
<para>Some blurb about the function
<funcsynopsis>
</funcsynopsis>
<variablelist>
</variablelist>
</para>
After the patch:
<para>Some blurb about the function</para>
<funcsynopsis>
</funcsynopsis>
<variablelist>
</variablelist>
There are no noticable differences when reading the doc
other than than the removed few pixels of spacing between
the function sysnopsis and the variable list block.
In some cases, there are no "blurb about the fucntion"
and the empty paragraph is removed.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Ligatures should be done by the typesetting system.
Manuscripts should not bother with them.
Signed-off-by: James Cloos <cloos@jhcloos.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Haven't restored the "specs" path in the install path, but have restored
libX11 & i18n subdirectories in the path for better logical grouping.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Moves HAVE_XMLTO check into docbook.am, more closely matches behaviour
from before docbook.am changes (commit e8c76407d2)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
When writing technical documentation, it is often necessary to cross
reference to other information. When that other information is not in the
current document, additional support is needed, namely <olink>.
A new feature with version 1.7 of xorg-sgml-doctools adds references to
other documents within or outside this package.
This patch adds technical support for this feature but does not change
the content of the documentation as seen by the end user.
Each book or article must generate a database containing the href
of sections that can be referred to from another document. This database
is installed in DATAROOTDIR/sgml/X11/dbs. There is a requirement that
the value of DATAROOTDIR for xorg-sgml-doctools and for the package
documentation is the same. This forms a virtual document tree.
This database is consulted by other documents while they are being generated
in order to fulfill the missing information for linking.
Refer to the xorg-sgml-doctools for further technical information.
Co-authored-by: Matt Dew <marcoz@osource.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
This reverts commit c870111546.
The constification of a pointer to a pointer caused unexpected issues,
and xorg-devel was unable to come up with a clean, safe, reasonable way
to handle them, so we're chalking this up for now as yet another mistake
in the Xlib API definition we'll be living with.
See https://bugs.freedesktop.org/show_bug.cgi?id=32098 for details.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Updates code & docs for XInternAtoms.
The single atom name argument to XInternAtom was already const char *
in the code, but not the docs, so updated it in the docs too.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This move fixes a Java class cast exception in the glossary.
The problem was introduced in commit
26f4f0d508
It may not happen on all versions of the doc toolchain.
There is no reason why indexterm cannot appear in glossdef,
this is a workaround to an implementation problem found by
trial and error.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Mostly "sup" to <superscript>
There's several more complicated equations that will probably need
MathML or SVG to solve.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>