-
099ed6fa
by Rin Okuyama
at 2018-03-24T18:21:15-07:00
avoid -Wformat errors from clang when building with -DDEBUG
https://bugs.freedesktop.org/show_bug.cgi?id=99882
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
66a26687
by Alan Coopersmith
at 2018-11-19T22:09:58-08:00
Update README for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
6624b5e7
by Alan Coopersmith
at 2019-03-16T12:41:24-07:00
Update configure.ac bug URL for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
77ae4048
by Adam Jackson
at 2019-05-14T15:36:20-04:00
fontfile: Remove unused 'bc' slot from _FontEntry
Whatever this is, we're not using it. On my machine we allocate about
1100 of these structs, and this change reduces the struct from 152 to 48
bytes, so this saves about 100k of memory.
Signed-off-by: Adam Jackson <ajax@redhat.com>
-
c4ed2e06
by Alan Coopersmith
at 2019-08-03T13:54:35-07:00
Add some unit testing utilities
The test/utils directory contains some standalone test programs for testing
libXfont funtionality without needing a full X server session. They could
be used to generate automated unit testing in the future, but that work has
not yet been done.
[v2: updated original work from libXfont 1.5 to 2.0 API & makefiles]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
d4c941ea
by Alan Coopersmith
at 2019-08-03T17:12:12-07:00
Add strlcat & strlcpy fallbacks if not provided by libc nor libbsd
Implementations copied from the Xserver
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
2178c744
by Alan Coopersmith
at 2019-08-03T19:31:14-07:00
Use bounds checking string functions everywhere
Replace strcpy, strcat, sprintf with strlcpy, strlcat, snprintf
everywhere, even where there were already bounds checks in place,
to reduce time spent checking static analysis results.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
27207d35
by Alan Coopersmith
at 2019-08-03T19:31:14-07:00
Add reallocarray fallback if not provided by libc nor libbsd
Implementation copied from the Xserver
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
f54470da
by Alan Coopersmith
at 2019-08-03T19:31:14-07:00
Convert multiplying realloc calls to use reallocarray instead
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
ddbee30d
by Alan Coopersmith
at 2019-08-04T11:23:20-07:00
Convert multiplying malloc calls to use mallocarray instead
Introduces mallocarray as a macro calling reallocarray with a NULL
pointer for the old allocation.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
194cb45c
by Alan Coopersmith
at 2019-08-04T11:23:33-07:00
fontxlfd.c: tell gcc that switch fallthrough is intentional
Quiets:
src/util/fontxlfd.c: In function ‘FontParseXLFDName’:
src/util/fontxlfd.c:450:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
replaceChar = '*';
~~~~~~~~~~~~^~~~~
src/util/fontxlfd.c:451:5: note: here
case FONT_XLFD_REPLACE_ZERO:
^~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
3e0e36e4
by Maya Rashish
at 2019-08-17T19:51:19+00:00
Fix whitespace
-
78085e6b
by Alan Coopersmith
at 2019-08-17T13:42:39-07:00
stubs/atom.c: check for ResizeHashTable failure
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
c1c5c9aa
by Alan Coopersmith
at 2019-08-17T13:56:03-07:00
ComputeScaledProperties: check for valid pointers before making atoms
Resolves coverity warning def23 from the list in
https://gitlab.freedesktop.org/xorg/lib/libxfont/issues/6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
c84ce6be
by Alan Coopersmith
at 2019-08-17T14:19:04-07:00
CatalogueRescan: if opendir() fails, unref fpes, but don't free the cat
None of the callers of CatalogueRescan check for failure before accessing
the cat pointer so don't free it (especially without clearing the pointer
to it in fpe->private), just unref the contents.
Can only be triggered if somehow stat() succeeds on the directory, but
opendir fails anyway (removed between the calls? permission problem?).
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
5561a9dc
by Alan Coopersmith
at 2019-08-17T14:31:24-07:00
fs_read_glyphs: check if rep is null before dereferencing
Resolves coverity warning def16 from the list in
https://gitlab.freedesktop.org/xorg/lib/libxfont/issues/6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
b46cd2fe
by Alan Coopersmith
at 2019-09-14T11:32:56-07:00
Add src/util/replace.h to noinst_HEADERS so it gets included in tarballs
Found when "make distcheck" failed.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
ed8b8e9f
by Alan Coopersmith
at 2019-09-14T11:34:03-07:00
libXfont2 2.0.4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>